Using Elastic Beanstalk With Amazon RDS

From Littledamien Wiki
Revision as of 17:52, 16 February 2016 by Video8 (talk | contribs)
Jump to navigation Jump to search

Overview

Notes about configuring a Django project hosted with AWS Elastic Beanstalk to use a stand-alone RDS instance for its database.

Setup

See Using Elastic Beanstalk with Amazon RDS - AWS Elastic Beanstalk Developer Guide

  1. In the Amazon RDS Management Console, create a new RDS instance. [1]
  2. Modify DB instance's security group to allow inbound traffic.
  3. Add the DB instance's security group to the Elastic Beanstalk environment.
  4. Save RDS connection information in Elastic Beanstalk environment.
    • Alternatively store the RDS connection string in Amazon S3 (more secure). [2]
  1. Restart the Elastic Beanstalk environment.

Migration

Database structure updates are managed by eb deploy automatically executing manage.py makemigrations and manage.py migrate.

See also PostgreSQL Backups and Migration

Notes

  1. Launching and Connecting to an External RDS - AWS Elastic Beanstalk Developers Guide
  2. Storing the Connection String in Amazon S3 - AWS Elastic Beanstalk Developers Guide