Running Databases on AWS

Amazon Web Services provides a number of database alternatives for developers. Amazon RDS enables you to run a fully featured relational database while offloading database administration; Amazon SimpleDB provides simple index and query capabilities with seamless scalability; and using one of our many relational database AMIs on Amazon EC2 and Amazon EBS allows you to operate your own relational database in the cloud. There are important differences between these alternatives that may make one more appropriate for your use case.




This page contains the following categories of information. Click to jump down:



Amazon EC2 Relational Databases AMIs

Developers may use a number of leading relational databases on Amazon EC2. An Amazon EC2 instance can be used to run a database, and the data can be stored within an Amazon EBS volume. Amazon EBS is a fast and reliable persistent storage feature of Amazon EC2. With Amazon EC2 Relational Database AMIs, developers avoid the friction of infrastructure provisioning while gaining access to a variety of standard database engines. Amazon EC2 Relational Database AMIs enable developers to skip the infrastructure and hardware provisioning typically associated with installing a new database server, while still enabling them to exert complete control over the administrative and tuning tasks associated with running a database server.

We recommend Amazon EC2 Relational Database AMIs for customers who:

  • Wish to select from a wide variety of database engines
  • Want to exert complete administrative control over their database server

Installing Relational Databases via AMIs

An Amazon Machine Image (AMI) is an encrypted machine image stored in Amazon S3. It contains all the information necessary to boot instances of your software. Many existing AMIs already come packaged with relational databases. To see a full listing of machine images, check the AMI summary page.

Relational Database AMIs


Database AMIs

IBM

Oracle
MySQL

Microsoft SQL Server

PostgreSQL

Sybase



Database Service

Vertica



Top


Amazon Relational Database Service (Amazon RDS)

If your application requires relational storage, but you want to reduce the time you spend on database management, Amazon RDS automates common administrative tasks to reduce your complexity and total cost of ownership. Amazon RDS automatically backs up your database and maintains your database software, allowing you to spend more time on application development. With the native database access Amazon RDS provides, you get the programmatic familiarity, and tooling and application compatibility, of a traditional relational database. You also benefit from the flexibility of being able to scale the compute resources or storage capacity associated with your relational database instance via a single API call.

With Amazon RDS, you still control the database settings that are specific to your business. This includes building a relational schema to fit your use case, creating indices, and tuning the performance of your database to your application’s workflow. You also take an active role in the scaling decisions for your database – you tell the service when you want to add more storage or change to a larger or smaller DB Instance class.

We recommend Amazon RDS for customers who:

  • Have existing or new applications, code, or tools that require a relational database
  • Want native access to a MySQL relational database, but prefer to offload the infrastructure management and database administration to AWS
  • Like the flexibility of being able to scale their database compute and storage resources with an API call, and only pay for the infrastructure resources they actually consume

For more information, see the Amazon RDS detail page.

Top


Amazon SimpleDB

For database implementations that do not require a relational model, and that principally demand index and query capabilities, Amazon SimpleDB eliminates the administrative overhead of running a highly-available production database, and is unbound by the strict requirements of a RDBMS. With Amazon SimpleDB, you store and query data items via simple web services requests, and Amazon SimpleDB does the rest. In addition to handling infrastructure provisioning, software installation and maintenance, Amazon SimpleDB automatically indexes your data, creates geo-redundant replicas of the data to ensure high availability, and performs database tuning on customers’ behalf. Amazon SimpleDB also provides no-touch scaling. There is no need to anticipate and respond to changes in request load or database utilization; the service simply responds to traffic as it comes and goes, charging only for the resources consumed. Finally, Amazon SimpleDB doesn’t enforce a rigid schema for data. This gives customers flexibility – if their business changes, they can easily reflect these changes in Amazon SimpleDB without any schema updates or changes to the database code.

However, Amazon SimpleDB is not a relational database, and does not offer some features needed in certain applications, e.g. complex transactions or joins.

We recommend Amazon SimpleDB for customers who:

  • Principally utilize index and query functions rather than more complex relational database functions
  • Don’t want any administrative burden at all in managing their structured data
  • Want a service that scales automatically up or down in response to demand, without user intervention
  • Require the highest availability and can’t tolerate downtime for data backup or software maintenance

For more information refer to the Amazon SimpleDB detail page.

Top


Storage Practices and Backups

Users who choose to employ Amazon EC2 Relational Database AMIs will use Amazon EBS to host the data for their database servers. Amazon EBS provides the ability to save snapshots to Amazon Simple Storage Service (Amazon S3). These backup snapshots should be performed in the same fashion as traditional systems, using either job schedulers or graphical agents. Amazon S3 provides durable storage that is automatically replicated to multiple locations.

Amazon RDS users can take advantage of an automatic backup facility that enables them to select the frequency at which backup snapshots are taken and a desired retention period (in number of days). Amazon RDS provides free backup storage up to the size of the provisioned database. Amazon RDS will automatically back up database and transaction logs, and enable restoration to any point within the retention period, up to the last five minutes. Users can also restore to any user-initiated backup snapshots they may have created.

Amazon SimpleDB users get the peace of mind provided by automated, geographically diverse replication. All Amazon SimpleDB data is synchronously copied to multiple nodes within different data centers to prevent any data loss in the event of a hardware failure or network disruption. In addition, a number of backup tools have been developed by the Amazon SimpleDB ecosystem, offering simple backups of domain data to Amazon S3..

Top


Security

The first step in securing a database is to follow the security guidelines specific for that database, paying special attention to access control. Please consult the documentation specific to your database of choice on the vendor’s/project’s website.

If you’re using Amazon EC2 and EBS for your database, you should also use the Amazon EC2 distributed firewall to limit access to your database. You can use group access rules to assure that only your instances have access to your database.

For a complete overview of AWS security, including security of Amazon SimpleDB and Amazon RDS, consult the Overview of Security Processes whitepaper.

Top


Documentation and Case Studies


Title Description
Running MySQL on Amazon EC2 with Elastic Block Store Using Amazon Elastic Block Store (EBS) as a persistent storage mechanism for a production MySQL database server, including snapshot backup and restore.
Case Study: Dream Factory Using Amazon Elastic Block Store (EBS) as a persistent storage mechanism for a production MySQL database server, including snapshot backup and restore.
Case Study: Alexa Alexa chose Amazon SimpleDB over MySQL to store intermediate status/log data and Amazon S3 retrieves input datasets and stores output datasets.



Top


Related Services
Scalable virtual compute environments in the cloud.

Web service providing core database functions of data indexing and querying.

Makes it easy to set up, operate, and scale a relational database in the cloud





New Oracle Whitepaper
Review this technical guide to get started running Oracle Database on Amazon EC2.





©2010, Amazon Web Services LLC or its affiliates. All rights reserved.