Unable to connect staging env - [DatabaseConnectError: Unable to connect to the given uri] / [Connection error: no pg_hba.conf entry for host]

Hey,

Thanks for your answer @Steve_Bunlon I will try with sslMode: "required" as with verify I had the issue :

ForestAdmin agent launch error: DatabaseConnectError: Unable to connect to the given uri: postgres://xxxx.eu-west-3.rds.amazonaws.com:5432/xxxx

Connection error: self-signed certificate in certificate chain [39m

So error with the certificate check.

For now in staging I can leave it in sslMode = "required" and skip certificate check but in production it wouldn’t be great…

While searching I saw that the subject was discussed in several threads.

I would like to use the RDS DB certificate (https://s3.amazonaws.com/rds-downloads/rds-ca-2019-root.pem) to establish the connection like here: https://node-postgres. com/features/ssl#self-signed-cert

I have read your doc (in particular SQL (without ORM) - Node.js Developer Guide) but I do not see how to pass my certificate to guarantee that this works with sslMode="verify"

Could you tell me how to proceed to pass the certificate ?

Thanks in advance

Florian