skip to Main Content

I’m attempting to set up a basic free tier AWS RDS postgres database. I have done this before, today. For some reason, I am suddenly unable to connect to any new databases I set up. I get this error when attempting to connect to the instance via sequeltron:

Error invoking remote method 'DB_CONNECT': error: no pg_hba.conf entry for host "66.31.166.89", user "postgres", database "playground", no encryption

I do not know why this is happening. Can someone enlighten me?

2

Answers


  1. When connecting to an Amazon RDS PostgreSQL database, you need to enable SSL on the connection.

    You did not show us the code you are using for the connection, but there would normally be an ssl or encryption option you can activate.

    Login or Signup to reply.
  2. If you are using PostgresSQL 15 or later this can be resolved by setting rds.force_ssl value to 0 in DB parameter group.

    AWS has defaulted to 1 (on) since PostgresSQL 15

    You can require that connections to your PostgreSQL DB instance use
    SSL by using the rds.force_ssl parameter. The rds.force_ssl parameter
    default value is 1 (on) for RDS for PostgreSQL version 15 and later.
    For all other RDS for PostgreSQL major versions 14 and older, the
    default value of this parameter is 0 (off). You can set the
    rds.force_ssl parameter to 1 (on) to require SSL/TLS for connections
    to your DB cluster. You can set the rds.force_ssl parameter to 1 (on)
    to require SSL for connections to your DB instance.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search