Amazon Relational Database Service (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 up to focus on your applications and business.
Amazon RDS gives you access to the full capabilities of a familiar MySQL database. This means the code, applications, and tools you already use today with your existing MySQL databases work seamlessly with Amazon RDS. Amazon RDS automatically patches the database software and backs up your database, storing the backups for a user-defined retention period. 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. As with all Amazon Web Services, there are no up-front investments required, and you pay only for the resources you use.
You can think of a DB Instance as a MySQL 5.1 environment in the cloud with the compute and storage resources you specify. You can create and delete DB Instances, define/refine infrastructure attributes of your DB Instance(s), and control access and security via the Amazon RDS APIs and Command Line Tools. Multiple MySQL databases can be created on a given DB Instance.
Amazon RDS manages the work involved in setting up a relational database, from provisioning the infrastructure capacity you request to installing the database software. Once your database is running on its own DB Instance, Amazon RDS automates common administrative tasks, such as performing backups and patching the database software that powers your DB Instance. Since Amazon RDS provides native database access, you interact with the relational database software (i.e. MySQL 5.1) as you normally would. This means you’re still responsible for managing the database settings that are specific to your application. You’ll need to build the relational schema that best fits your use case and are responsible for any performance tuning to optimize your database for your application’s workflow.
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.
See Running Databases on AWS for additional guidance on which solution is best for you.
To sign up for Amazon RDS, you must click the “Sign up for Amazon RDS” button on the Amazon RDS detail page and complete the sign-up process. You must have an Amazon Web Services account; if you do not already have one, you will be prompted to create one when you begin the Amazon RDS sign-up process. After you are signed up for RDS, please refer to the Amazon RDS documentation, which includes our Getting Started Guide.
DB Instances are simple to create, using either the Amazon RDS Command Line Tools or APIs. Simply specify the instance identifier, database engine, compute class, storage, master user, and master user password with the rds-create-db-instance or CreateDBInstance API, and within minutes, your DB Instance is up and running.
Once your DB Instance is available, you can retrieve its endpoint via the DescribeDBInstance API. Using this endpoint you can construct the connection string required to connect directly with your DB Instance using your favorite database tool or programming language. In order to allow network requests to your running DB Instance, you will need to authorize access. For a detailed explanation of how to construct your connection string and get started, please refer to our Getting Started Guide.
As of this point in time, you are limited to running twenty DB Instances. If your application requires more than twenty DB Instances, you can request additional DB Instances via the request form on the Amazon RDS detail page.
There are a number of simple ways to import data into Amazon RDS, such as with the mysqldump or mysqlimport utilities. For more information on data import and export, please refer to the Amazon RDS MySQL Data Import Guide.
Amazon RDS currently supports MySQL 5.1 (Community Edition). The default database storage engine is InnoDB.
Amazon RDS is currently offered in a single availability zone. In the coming months we will make available a High Availability option for Amazon RDS, enabling you to provision synchronously replicated DB Instances in multiple availability zones (AZ’s), to protect against failure within a single location. In the unusual case where your DB Instance does fail, you can use the RestoreDBInstanceToPointInTime API to create a new DB Instance from the latest restorable time. The DB Instance backup data that enables restore operations is replicated geo-redundantly in multiple availability zones for greater levels of data durability. We encourage you to take advantage of the Amazon RDS automated backup feature and backup storage allocated at no additional charge to guard against data loss in the event of DB Instance failure.
Any system changes (such as patching the database software) or modifications you have requested (such as scaling DB Instance class or storage capacity) will be completed within a weekly four hour maintenance window. The only time we will take your DB Instance offline is for backups or software patching; patching should seldom require more than a fraction of your maintenance window, occurs infrequently, and is used only for patches that are security or durability related. If you did not specify a preferred maintenance window when creating your DB Instance, a default value is assigned (such as Sun:05:00-Sun:09:00 UTC for DB Instances in the US-East region). Ideally this window should fall at the time of lowest database usage and thus may need to be modified. If you wish to modify when maintenance is performed on your behalf, you can do so using the ModifyDBInstance API. Each of your DB Instances can have different preferred maintenance windows, if you so choose. For more information on using the APIs or command line interface to specify your maintenance window, please refer to the Amazon RDS Developer Guide.
Automatically performing critical updates to the MySQL database software powering your DB Instance is a core function of Amazon RDS and cannot be turned off. However, as previously mentioned, you can control the time of the maintenance window when patches are applied to minimize the operational impact of patching. At this point in time, you cannot opt-out of critical patches to the MySQL software. However, you will be informed about upcoming patches via the Amazon RDS forums.
You can access the MySQL slow query logs for your database to determine if there are slow-running SQL queries and, if so, the performance characteristics of each. For more information on accessing and querying the slow query table, please refer to the Amazon RDS Developer Guide. You may also want to check the CPU utilization metrics for your DB Instance via Amazon CloudWatch. High levels of CPU utilization can reduce query performance and in this case you may want to consider scaling your DB Instance class. For more information on monitoring your CPU utilization, read the Amazon RDS Monitoring Guide.
You pay only for what you use, and there are no minimum or setup fees. You are billed based on:
For Amazon RDS pricing information, please visit the pricing section on the Amazon RDS product page.
Billing commences for a DB Instance as soon as the DB Instance is available. Billing continues until the DB Instance terminates, which would occur upon deletion or in the event of instance failure.
DB Instance hours are billed for each hour your DB Instance is running in an available state. If you no longer wish to be charged for your DB Instance, you must terminate it to avoid being billed for additional instance-hours. Partial DB Instance hours consumed are billed as full hours.
The storage provisioned to your DB Instance for your primary data is located within a single availability zone. When your database is backed up, the backup data (including transactions logs) is geo-redundantly replicated across multiple availability zones to provide even greater levels of data durability. The price for backup storage beyond your free allocation reflects this extra replication that occurs to maximize the durability of your critical backups.
In order to select your initial DB Instance class and storage capacity, you will want to assess your application’s compute, memory and storage needs. For more guidelines on picking the right DB Instance class and storage capacity, please refer to the Amazon RDS DB Instance Sizing Guide
You can scale the compute resources and storage capacity allocated to your DB Instance with the ModifyDBInstance API. Memory and CPU resources are modified by changing your DB Instance class, and storage available is changed when you modify your storage allocation. Please note that when you modify your DB Instance class or allocated storage using the ModifyDBInstance API, your requested changes will be applied during your specified maintenance window. Alternately, you can use the “apply-immediately” flag to apply your scaling requests immediately. Bear in mind that any other pending system changes will be applied as well.
Monitor the compute and storage resource utilization of your DB Instance, for no additional charge, via Amazon CloudWatch. You can access metrics such as CPU utilization, storage utilization, and network traffic. To learn more about monitoring your active DB Instances, read the Amazon RDS Monitoring Guide.
The storage capacity allocated to your DB Instance can be increased while maintaining DB Instance availability. However, when you decide to scale the compute resources available to your DB Instance up or down, your database will be temporarily unavailable while the DB Instance class is modified. This period of unavailability typically lasts only a few minutes, and will occur during the maintenance window for your DB Instance, unless you specify that the modification should be applied immediately.
Amazon RDS supports a variety of DB Instance classes and storage allocations to meet different application needs. If your application requires more compute resources than the largest DB Instance class or more storage than the maximum allocation, you can implement partitioning, thereby spreading your data across multiple DB Instances.
Amazon RDS provides two different methods for backing up and restoring your DB Instance(s): automated backups and database snapshots (DB Snapshots). The automated backup feature of Amazon RDS automatically performs a daily backup of your data (during your preferred backup window) and captures transaction logs (constantly). Amazon RDS retains backups of a DB Instance for a limited, user-specified period of time called the retention period, which by default is one day; your database can later be recovered to any point in time within the retention period, up to the last available transaction log. You can use the DescribeDBInstances API to return the latest restorable time for you DB Instance(s). DB Snapshots are user-initiated and enable you to back up your DB Instance in a known state as frequently as you wish, and then restore to that specific state at any time. DB Snapshots can be created with the CreateDBSnapshot API and are kept until you explicitly delete them with the DeleteDBSnapshot API. Please note: When you perform a restore operation to a point in time or from a DB Snapshot, a new DB Instance is created with a new endpoint (the old DB Instance can be deleted with the DeleteDBInstance API, if so desired).
By default and at no additional charge, Amazon RDS enables automated backups of your DB Instance with a 1 day retention period. Free backup storage is limited to the size of your provisioned database and only applies to active DB Instances. For example, if you have 10GB-months of provisioned database storage, we will provide at most 10GB-months of backup storage at no additional charge. If you would like to extend your backup retention period beyond one day, you can do so using the CreateDBInstance API (when creating a new DB Instance) or ModifyDBInstance API (for an existing DB Instance). You can use these APIs to change the RetentionPeriod parameter from 1 to the desired number of days. For more information on automated backups, please refer to the Amazon RDS Developer Guide.
The preferred backup window is the user-defined period of time during which your DB Instance is backed up. Amazon RDS uses these periodic data backups in conjunction with your transaction logs to enable you to restore your DB Instance to any point in time during your retention period. During the backup window, storage I/O may be suspended while your data is being backed up. This typically lasts a few minutes.
You can use the ModifyDBInstance API to manage the period of time your automated backups are retained by modifying the RetentionPeriod parameter. If you desire to turn off automated backups altogether, you can do so by setting the retention period to 0 (not recommended). You can see a list of the user-created DB Snapshots for a given DB Instance using the DescribeDBSnapshots API and delete snapshots with the DeleteDBSnapshot API.
To begin using Amazon RDS you will need an AWS developer account. If you do not have one prior to signing up for Amazon RDS, you will be prompted to create one when you begin the sign-up process. A master user account is different from an AWS developer account and used only within the context of Amazon RDS to control access to your DB Instance(s). The master user account is a native database user account which you can use to connect to your DB Instance. You can specify the master user name and password you want associated with each DB Instance when you create the DB Instance. Once you have created your DB Instance, you can connect to the database using the master user credentials. Subsequently, you may also want to create additional user accounts so that you can restrict who can access your DB Instance.
The default privileges for the master user include: create, drop, references, event, alter, delete, index, insert, select, update, create temporary tables, lock tables, trigger, create view, show view, alter routine, create routine, execute, trigger, create user, process, show databases, grant option.
No, everything works the way you are familiar with when using a relational database. For example, when running a DB Instance with MySQL 5.1, you will use commands like CREATE USER, RENAME USER, GRANT, REVOKE, SET PASSWORD, or directly modify the MySQL schema tables.
Amazon RDS allows you to control access to your DB Instances using database security groups (DB Security Groups). A DB Security Group acts like a firewall controlling network access to your DB Instance. By default, network access is turned off to your DB Instances. If you want your applications to access your DB Instance you can set your DB Security Group to allow access from specific EC2 Security Groups or IP ranges. This process is called ingress. Once ingress is configured for a DB Security Group, the same rules apply to all DB Instances associated with that DB Security Group.
Yes. You have to intentionally turn on the ability to access your database over the Internet by granting permissions to your Amazon RDS DB Security Group(s) for access over the Internet. You can authorize access for only the specific IP’s, IP ranges, or subnets corresponding to servers in your own data center.
Amazon RDS by default chooses the optimal configuration parameters for your DB Instance taking into account the DB Instance’s compute resource and storage capacity. However, if you want to change them, you can do so using our configuration management APIs. Please note that changing configuration parameters from recommended values can have unintended effects, ranging from degraded performance to system crashes, and should only be attempted by advanced users who wish to assume these risks. For more information on changing parameters, please refer to the Amazon RDS documentation.
A database parameter group (DB Parameter Group) acts is a “container” for engine configuration values that can be applied to one or more DB Instances. If you create a DB Instance with a MySQL engine and don’t specify a particular DB Parameter Group, a “default.MySQL5.1” DB Parameter Group is used. This default group contains engine defaults and Amazon RDS system defaults optimized for the DB Instance you are running. However, if you want your DB Instance to run with your custom-specified engine configuration values, you can simply create a new DB Parameter Group, modify the desired parameters, and modify the DB Instance to use the new DB Parameter Group. Once associated, all DB Instances that use a particular DB Parameter Group get all the parameter updates to that DB Parameter Group. For more information on configuring DB Parameter Groups, please read the Amazon RDS DB Parameter Group Deployment Guide.
You can use the Amazon RDS APIs or command line tools to see information about your DB Parameter Groups and their corresponding parameter settings.