Connect Prisma to AWS RDS Database (PostgreSQL)
first time i'm trying to connect my prisma to AWS database, I'm using RDS and postgresql as database so I think I input my database connection credentials correctly but I receive error
here is my env
DATABASE_URL="postgresql://callmenikk:<my database password>@sayonce.cglt0pzzqenk.eu-central-1.rds.amazonaws.com:5432/postgres"
- callmenikk
my aws account username
- <my database password>
: my database generated password which is randomly made by aws
- sayonce.cglt0pzzqenk.eu-central-1.rds.amazonaws.com/5432
: endpoint of database and port which is shown on aws
- /postgres
: im not sure if my database name here is correctly because on aws connections section DB Name has -
symbol so I thought postgres would be correct
also YES my database is publicly accessable and I configured inbound rules to make connection from TCP/IP
so what am I doing wrong?3 Replies
Does your database run in a VPC that is reachable from the public internet?
Working with a DB cluster in a VPC - Amazon Aurora
Learn about working with an Amazon Aurora DB instance in a VPC.
(Assuming your app runs on vercel the database needs to be accessible from the open internet. If not the vpc should allow in- / egress from the ip of where your application is running)