Simon Melouah
Simon Melouah

Reputation: 652

AWS: Can't connect EC2 instance to RDS instance after configuring security groups

After starting up a MySql RDS t2.micro instance and configuring the security groups accordingly to grant access from both my own ip and the public ip of my EC2 instance I received a connection timeout when trying to connect. The connection works perfectly fine locally, Multi AZ is set to None and the regions on both the RDS and EC2 are exactly the same.

There is probably something small I'm missing but I've read through countless documentation now trying to find out what it is.

One configured to grant local access and the other for EC2

Upvotes: 0

Views: 100

Answers (1)

Mark B
Mark B

Reputation: 200910

both my own ip and the public ip of my EC2 instance

You should use the private IP in the security group instead of the public IP. An even better method would be to list the security group the EC2 instance belongs to, instead of its IP address.

Upvotes: 1

Related Questions