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
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
orencryption
option you can activate.If you are using PostgresSQL 15 or later this can be resolved by setting
rds.force_ssl
value to0
in DB parameter group.AWS has defaulted to 1 (on) since PostgresSQL 15