Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

I have a CodeIgniter PHP app setup on an Elastic Beanstalk instance. I'm trying to connect it to an RDS MySQL instance I set up but loading the Elastic Beanstalk site URL always results in the page timing out the connection. I've narrowed down the issue to not being able to connect to the database.

I think I've set up my security groups properly to allow the Elastic Beanstalk EC2 instances to talk to RDS, but something must be wrong as the page still doesn't load.

I've included screenshots below of the inbound/outbound rules for the security group that RDS and Elastic Beanstalk use, as well as a screenshot of what security groups I have attached to the Elastic Beanstalk instance.

Inbound rules

Outbound rules

Any ideas as to why my Elastic Beanstalk app can't talk to my RDS instance?

1 Answer

0 votes
by (44.4k points)

Log in to your EC2 instance by SSHing and then test your RDS connection in it using this

mysql -u user -p password -h rds.instance.endpoint.region.rds.amazonaws.com

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

Browse Categories

...