PrismaP
Prisma6mo ago
2 replies
Lukas

How to connect via SSL to an AWS RDS instance?

according to AWS for a secure connection (so that all data transeferred between an client and a server) the following is needed according to this documentation: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Concepts.General.SSL.html
1. The server Certificate that can be found here: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html
2. and then setting the option on the connection to sslmode=verify-ca or sslmode=verify-full

now when i download the file (eu-central-1-bundle.pem) and i store that in my code next to the prisma.schema file, i should be able to connect to the database with the following options on my connection string:

sslmode=require&sslaccept=strict&sslrootcert=./eu-central-1-bundle.pem

however, I get an error SSL routines:tls_post_process_server_certificate:certificate verify failed:../ssl/statem/statem_clnt.c:1889: (self-signed certificate in certificate chain)

what else needs to be done to get that working?
Use SSL with an RDS for PostgreSQL DB instance.
Create encrypted connections to your Amazon RDS database using SSL/TLS.
Was this page helpful?