AWS - Connect to RDS via EC2 problem

Soldato
Joined
18 May 2010
Posts
22,787
Location
London
Been banging my head against the wall on this one for a few hours now.

What I want ultimately is to ssh through an EC2 instance in a public subnet to an RDS MySQL instance in a private subnet.

I've been using SQL work bench for this.

I've configure the NACLs and security groups etc to the best of my knowledge but it isn't working.

So I thought keep it simple and SSH on to the EC2 instance first then test the connectivity to the RDS MySQL database.

However even from the EC2 instance I cannot connect to the RDS MySQL database.

telnet aws.endpoint.rds.example 3306

The Database has a security group which has opened up port 3306 to the world. But I still cannot connect even from an EC2 instance in the same VPC.

What am I missing?

I opened up the security rules for everything from everything and I still cannot connect from EC2 to RDS.

At this point it should be working.
 
Last edited:
So this is what I did yesterday. I opened up every NACL and every SG to access all TCP traffic to any port and it works.

So I tried to then tighten up the public subnets NACL.

I only opened up SSH HTTP HTTPS & 3306.

This then breaks the connection! So I am still perplexed. What port other than 22 or 3306 is it now using inbound to initiate the connection?

As a test I deleted these rules and put it back to all TCP traffic to any port (inbound NACL) and it works again!

:confused:
 
Back
Top Bottom