Search code examples
mysqldjangopython-2.7amazon-web-servicesrds

Django app on Elastic Beanstalk can't connect to RDS


I have a Django app running on Elastic Beanstalk that is throwing the following error:

[:error] [pid 12271] (2003, "Can't connect to MySQL server on 'xxxxxxxx.xxxxxxxxxxx.us-east-1.rds.amazonaws.com' (110)")

I have no issue connecting to the EB server via ssh and then connecting to MySql:

mysql -uadmin -p -hxxxxxxxx.xxxxxxxxxxx.us-east-1.rds.amazonaws.com

So I've ruled out that its a firewall issue, or problems with my VPC. I've also tried hardcoding the credentials in the settings.py file to rule out issues with the ENV vars. I don't know much about Django so any help would be appreciated.


Solution

  • I was missing some packages for my .ebextensions, I added:

    packages:
      yum:
        gcc: []
        mysql: []
        mysql-devel: []
        python-devel: []