AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Configuring Databases with AWS Elastic Beanstalk

Amazon Web Services offers a number of database options that you can leverage for your application such as Amazon Relational Database Service (Amazon RDS), Amazon DynamoDB, and Amazon ElastiCache.

Amazon RDS is a web service that makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while managing time-consuming database administration tasks, freeing you to focus on your applications and business.

You can use the Database tab to create an Amazon RDS DB Instance and attach it to an existing AWS Elastic Beanstalk environment, or if you have already created an instance using AWS Elastic Beanstalk, you can view the DB Instance connectivity information for the following container types:

  • Node.js

  • PHP 5.3 and PHP 5.4

  • Python

  • Ruby 1.8.7 and 1.9.3

  • Apache Tomcat 6 and 7

  • Windows Server 2008 R2 running IIS 7.5 and Windows Server 2012 running IIS 8

If you have deployed an AWS Elastic Beanstalk using a legacy container type, then you will not see the option to create or view an Amazon RDS DB Instance in the Database tab. Depending on your programming language, there are several other alternatives you can use.

For more information about legacy and non-legacy container types, see Migrating Your Application from a Legacy Container Type.

This topic walks you through how to create a new RDS DB Instance using the Database tab as well as view the RDS DB Instance information for non-legacy container types.

AWS Management Console

If you have not already associated an Amazon RDS database with your application, you can do this inside the Database tab.

AWS Elastic Beanstalk Database Configuration Window

To create an Amazon RDS database and associate it with your existing environment

  1. Select if you want to create a blank Amazon RDS DB or create one from a snapshot. If you choose to create a database from a snapshot, then select a snapshot from the Snapshot list.

  2. Select a database engine from the DB Engine list.

  3. Select a database instance class from the Instance Class list. For information about the DB instance classes, go to http://aws.amazon.com/rds/.

  4. Type the allocated storage for your database in the Allocated Storage box. In some cases, allocating a higher amount of storage for your DB Instance than the size of your database can improve I/O performance. For information about storage allocation, go to Features.

  5. Type a name in the Master Username box using alphanumeric characters that you will use as the master user name to log on to your DB Instance with all database privileges.

  6. Type a password in the Master Password box containing from 8 to 16 printable ASCII characters (excluding /,", and @) for your master user password.

  7. In the Deletion Policy list, select if you want to create a snapshot of your database or delete it if you terminate your AWS Elastic Beanstalk environment. If you select Delete, then your RDS DB will be deleted and your data will be lost if you terminate your environment.

  8. Click Multiple Availability Zones if you want to configure your database across mutliple Availability Zones. Running your database instance in multiple Availability Zones safeguards your data in the unlikely event of a database instance component failure or service health disruption in one Availability Zone.

  9. Click Apply Changes.

After you have created your DB Instance, you can view your connectivity and configuration information on the tab as shown in the following figure.

AWS Elastic Beanstalk Database Configuration Window

Use the connectivity information to connect to your DB from inside your application through environment variables. For more information about using Amazon RDS with your applications, see the following topics.