I am currently using AWS's free tier. I am receiving the error message:
could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "xxxxxxxxx" (-) and accepting TCP/IP connections on port 5432?
This has happened twice now with 2 different databases. Each time after creating the DB on AWS, they both worked perfectly fine for 4 or 5 days without any connection issues. I have not changed any settings in pgAdmin, psql, or AWS since creating the two databases, so I am unsure of the cause.
EDIT: I just logged into pgAdmin, and now I can connect. I guess my updated question is 'has anyone had this problem with AWS'? I did absolutely nothing aside from checking the firewall as dezso suggested, and this was 4 hours after I restarted the database and still couldn't connect. Also, just to clarify, the database was definitely available after restarting it when I tried to, but couldn't connect the last time.
EDIT:
It has once again temporarily stopped connecting and no settings have changed.
netstat
output suggests that at least the port is not open. This might be due to the DB not running, among others.