Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database trouble deploying django app to amazon beanstalk

I tried to deploy my Django application to AWS beanstalk. For this I was following this tutorial: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html

However, when I use deploy the app using eb create, I get a MySQL error

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock

I am guessing this is because I haven't done any database configuration (the document above doesn't mention a configuration step even once). So, I tried to add an RDS database using this guide: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.db.html.

Now, I am getting the error that

RDS requires that you have a subnet selected in at least two Availability Zones.

When I tried to create this subnets, other issues involving VPN's etc crop up. Can someone please help me get a simple django app up and running on the aws? Thanks!

like image 708
sudshekhar Avatar asked Oct 14 '15 16:10

sudshekhar


1 Answers

Since you are using elastic beanstalk,do not create separate RDS. You can use the AWS Console to deploy the django application. Choose the RDS configuration while deploying the application and the subnet settings are all taken care by it self

like image 109
Hariprasad Krishnamurthy Avatar answered Nov 16 '22 12:11

Hariprasad Krishnamurthy