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
Error: P1001: Can't reach database server at `sayonce.cglt0pzzqenk.eu-central-1.rds.amazonaws.com`:`5432`

Please make sure your database server is running at `sayonce.cglt0pzzqenk.eu-central-1.rds.amazonaws.com`:`5432`.
Error: P1001: Can't reach database server at `sayonce.cglt0pzzqenk.eu-central-1.rds.amazonaws.com`:`5432`

Please make sure your database server is running at `sayonce.cglt0pzzqenk.eu-central-1.rds.amazonaws.com`:`5432`.
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
danmrkw
danmrkw2y ago
Does your database run in a VPC that is reachable from the public internet?
danmrkw
danmrkw2y ago
(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)
Want results from more Discord servers?
Add your server