How to connect to AWS RDS PostgreSQL with a GUI
Connect a PostgreSQL GUI to Amazon RDS or Aurora PostgreSQL: find the endpoint, open the security group, and use SSL with the RDS certificate bundle.
Updated · 4 min read · By Piyush Gupta
What you need
- The instance endpoint, from the RDS console under Connectivity & security (for example mydb.abc123.us-east-1.rds.amazonaws.com).
- The port, 5432 unless you changed it.
- The master username and password you set when creating the database, or another database user.
- Network access from your computer, described below.
Allow your computer to reach the database
If the instance has public access enabled, add an inbound rule to its VPC security group for TCP port 5432 from your IP address. If it's private, connect through a VPN, AWS Client VPN or a bastion host inside the VPC instead.
Note: Only allow your own IP address. Opening port 5432 to 0.0.0.0/0 exposes the database to the whole internet.
Connect with PostCompass
- Open Databases and click Add remote connection.
- Choose AWS RDS / Aurora as the provider. Encryption is set to Require automatically.
- Paste the endpoint as the host, then enter the port, user, password and database (often postgres).
- Click Test connection, then Add connection.
Verify the server certificate (recommended)
Require encrypts traffic but doesn't check who you're talking to. For full protection against man-in-the-middle attacks, download Amazon's certificate bundle and choose Verify certificate.
https://truststore.pki.rds.amazonaws.com/global/global-bundle.pemIn PostCompass, set Encryption to Verify certificate and select the downloaded global-bundle.pem as the CA certificate.
Troubleshooting
- Connection times out: the security group or network doesn't allow your IP, or the instance isn't publicly accessible.
- Password authentication failed: check the username and password; RDS usernames are case-sensitive.
- SSL error with Verify certificate: make sure you selected the RDS bundle and used the instance endpoint, not an IP address.