In RDS PotgreSQL 12, I can connect to DB using psycopg2 from local and also from Lambda function.
But when I upgrade to RDS PotgreSQL 15, I cannot connect to DB from Lambda anymore (I still can connect from local though).
The error that Lambda gives is:
FATAL: no pg_hba.conf entry for host ***, user ***, database ***, no encryption
This is how I connect:
import psycopg2
connection_psql = psycopg2.connect(user=***
, password=***
, port="5432"
, database=***
, host=***)