1

I'm trying to create a postgres RDS database on AWS that's accessible to the public without the need for SSH tunnelling. This is for development only. I've created a Separate AWS VPC and assigned gateways and two subnets to it. when I created the database I set it to be public. The security group rules are

Inbound(Custom TCP Rule,TCP 5432,0.0.0.0/0) outbound (All traffic,All,All,0.0.0.0/0)

I can't seem to connect to this database with my local pgadmin.

2 Answers 2

1

Did you enable your VPC attributes to have DNS hostnames and DNS resolution enabled? These must be set in order for your DB instance to be publicly accessible.

3
  • Yep I did this, I can't set the public flag on the RDS setup without it Apr 10, 2015 at 2:01
  • 1
    Hm, I have the exact same set up as you and was able to connect to my public RDS using pgadmin. My VPC has 2 subnets, both subnets are in a network acl that has a routing table that allows all inbound. My security group only allows inbound tcp 5432 from 0.0.0.0/0. Can you try running telnet yourrds.fdsaj4mph17.us-east-1.rds.amazonaws.com 5432 to verify the RDS is reachable? You should see "Connected to ec2-x-x-x.compute-1.amazonaws.com"
    – bsnchan
    Apr 10, 2015 at 3:04
  • thanks I had the subnets and ACLs set correctly but your response made me double check the settings in which I determined that I didn't have both subnets associated to the route table, once I added that it worked. Also Im familiar with the telnet trick to verify DB connections but I read somewhere that amazon AWS didn't allow Telnet connections. That was wrong I was able to verify the connection with tellnet, Very cool! thanks Apr 10, 2015 at 3:58
0

I verified I had at least two subnets which ACLs allowed connection to the internet but one of the subnets wasn't associated to the route, when I added it I was able to connect to it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.