Trouble connecting to AWS RDS instance

workspace
postgresql

#1

When trying to connect to an AWS PostgreSQLinstance through command line, I cannot connect through C9 despite being able to on my personal laptop without any problems.

I type in the following commands when calling psql in C9’s interface…

psql --host=xxxxxxxxxxxxx..us-west-2.rds.amazonaws.com --port=5432 --username=xxxxxxxx --password --dbname=xxxxxxxxx

Where the x’s are replaced with the correct information. After a few minutes, I get the following error message…
psql: could not connect to server: Connection timed out
Is the server running on host “xxxxxxxxxxxx.us-west-2.rds.amazonaws.com” (xxxxxxxxx) and accepting
TCP/IP connections on port 5432?

However, I can still log in on both psql and pgadmin on my personal laptop. Is anyone else having this issue?


#2

check if connections are allowed from any ip, maybe it is configured to accept connections only from your ip


#3

It was set to public as I never set it directly to my IP address. I created a new dummy db in the free tier and it is connecting. I will take the time to go through all of the settings in AWS tomorrow to see exactly why this is happening.