0 votes
1 view
in AWS by (19.2k 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.6k 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

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...