DEV Community

Tony Zheng
Tony Zheng

Posted on

RDS while connection error: no pg_hba.conf entry for host

Create a New Parameter Group:

  1. Open the Amazon RDS console at https://console.aws.amazon.com/rds/.
  2. In the navigation pane, choose "Parameter groups".
  3. Click "Create parameter group" at the top right of the page.
  4. In the "Parameter group family" dropdown, select "postgres15".
  5. In the "Group name" field, enter a name for the new parameter group.
  6. In the "Description" field, enter a description for the new parameter group.
  7. Click "Create" at the bottom right of the page.

Modify the rds.force_ssl Parameter of your new Parameter Group:

  1. In the list of parameter groups, click on the name of the new parameter group you just created.
  2. In the "Filter parameters" box, type rds.force_ssl and press Enter.
  3. You should see the rds.force_ssl parameter. Click "Edit parameters".
  4. Change the value of rds.force_ssl from 1 to 0, then click "Save changes".

Associate Your RDS Instance with the New Parameter Group:

  1. In the navigation pane, choose "Databases".
  2. Click on the name of your RDS instance.
  3. Click "Modify" at the top right of the page.
  4. In the "Database options" section, find the "DB parameter group" setting and select the new parameter group you created from the dropdown menu.
  5. Scroll down and click "Continue".
  6. Review the summary of modifications and click "Modify DB Instance".

Reboote Your RDS Instance:

  1. In the navigation pane, choose "Databases".
  2. Click on the name of your RDS instance.
  3. Click "Actions" at the top right of the page, then "Reboot".
  4. Confirm that you want to reboot the instance.

By following these steps, you should be able to successfully modify the rds.force_ssl parameter in your Amazon RDS instance. And hopefully the connection issue would be resolved.

Top comments (0)