Connecting to RDS Postgres from remote machine


I have configured an RDS Postgres micro instance for testing but am having problem connecting. I have created a security group and allow all hosts ( by default to port 5432 but for some reason I am not able to connect. I tried connecting to the port 5432 on the machine but it appears to be closed. Any ideas? I have verified that the security group is using the correct security group.

This is my configuration

Here is how I am trying to connect to the rds service


OK feel a little silly after figuring out that rds starts up on a private 172 subnet. I was able to connect from my ec2 instance.

Question now is there a way to put that on a public address that I can connect to? I would like to configure it with a security group that limits the source ip but then be able to connect to it with psql from my desktop.

Update 2

I don’t remember all the details when I originally posted this question but it is no longer an issue. We now have a management vpc that we connect to using a vpn server. The management vpc network is trusted by the prod and devel security groups for the rds instances. We have no problem communicating with them without adding any public ips.


Step 4 of the RDS setup wizard (“Additional Config”) lets you select whether the DB is Publicly Accessible or not (if it’s not, access is limited to within your VPC, regardless of your security group settings). I’d imagine that determines whether the hostname resolves to 54.* vs 172.* .

Your first instance may have been set to private – as far as I can tell this can’t be changed after initialization. I had a similar issue and creating a new instance set to be publicly accessible solved it for me.

Leave a Reply