AWS Elastic Beanstalk App with Database
- Deploying django on elastic beanstalk Refer Here for the official documentation
- Initialize your eb cli repository
- Since our app uses db lets use the preconfigure Environmental variables provided by RDS Refer Here
- Now create environment
- Now get status and get the cname and add it to the Allowed hosts in settings.py
- Deploy the application
- Now try to access the application
- Since there is no db our application fails, Lets add DB instance to the environment Refer Here
- Now the DB is created and hooked to aws elastic beanstalk environment
- Now to create the migrations we need to create one more config. Refer to the section Add a database migration configuration file in the following link Refer Here
- Then use the application
- Refer Here for the code