I created my Postgres database in AWS but it has connection timeouts every time I try to connect (using JDBC or pgadmin). I even added security groups but that didn’t help.
Since I’m new in AWS I really have no idea what to do. Should I check any logs or I missed something during set-up?
Question posted in Amazon Web Sevices
The official Amazon Web Services documentation can be found here.
The official Amazon Web Services documentation can be found here.
2
Answers
From where are you trying to connect?
If you’re trying from a local machine, the DB must be deployed in a public subnet, and must have a public IP.
Some things to check:
Publicly Available = Yes
(Done!)0.0.0.0/0
(Done!)I tried connecting from my computer and it timed-out too, and I know that my "network permits" such traffic.
Therefore, it seems likely that the database was launched with a subnet group that contained only private subnets, which are not reachable from the Internet.
Update:
It appears that the database has been launched with a Subnet Group that contains private subnets rather than public subnets.
If you have not yet connected to the database / stored any data, it would be easiest to:
For security, you should adjust the Security Group to only allow access from your IP address (removing the entries for
0.0.0.0/0
).