Amazon Relational Database Service
User Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Stopping an Amazon RDS DB Instance Temporarily

If you use a DB instance intermittently, for temporary testing, or for a daily development activity, you can stop your Amazon RDS DB instance temporarily to save money. While your DB instance is stopped, you are charged for provisioned storage (including Provisioned IOPS) and backup storage (including manual snapshots and automated backups within your specified retention window), but not for DB instance hours. For more information, see Billing FAQs.

Note

In some cases, a large amount of time is required to stop a DB instance. If you want to stop your DB instance and restart it immediately, you can reboot the DB instance. For information about rebooting a DB instance, see Rebooting a DB Instance.

You can stop and start DB instances that are running the following engines:

  • MariaDB

  • Microsoft SQL Server

  • MySQL

  • Oracle

  • PostgreSQL

Stopping and starting a DB instance is supported for all DB instance classes, and in all AWS Regions.

You can stop and start a DB instance whether it is configured for a single Availability Zone or for Multi-AZ, for database engines that support Multi-AZ deployments. You can't stop an Amazon RDS for SQL Server DB instance in a Multi-AZ configuration.

When you stop a DB instance, the DB instance performs a normal shutdown and stops running. The status of the DB instance changes to stopping and then stopped. Any storage volumes remain attached to the DB instance, and their data is kept. Any data stored in the RAM of the DB instance is deleted.

You can stop a DB instance for up to seven days. If you don't manually start your DB instance after seven days, your DB instance is automatically started.

Benefits

Stopping and starting a DB instance is faster than creating a DB snapshot, and then restoring the snapshot.

When you stop a DB instance it retains its ID, Domain Name Server (DNS) endpoint, parameter group, security group, and option group. When you start a DB instance, it has the same configuration as when you stopped it. In addition, if you stop a DB instance, Amazon RDS retains the Amazon Simple Storage Service (Amazon S3) transaction logs so you can do a point-in-time restore if necessary.

Limitations

The following are some limitations to stopping and starting a DB instance:

  • You can't stop a DB instance that has a Read Replica, or that is a Read Replica.

  • You can't stop an Amazon RDS for SQL Server DB instance in a Multi-AZ configuration.

  • You can't modify a stopped DB instance.

  • You can't delete an option group that is associated with a stopped DB instance.

  • You can't delete a DB parameter group that is associated with a stopped DB instance.

Option and Parameter Group Considerations

You can't remove persistent options (including permanent options) from an option group if there are DB instances associated with that option group. This functionality is also true of any DB instance with a state of stopping, stopped, or starting.

You can change the option group or DB parameter group that is associated with a stopped DB instance, but the change does not occur until the next time you start the DB instance. If you chose to apply changes immediately, the change occurs when you start the DB instance. Otherwise the changes occurs during the next maintenance window after you start the DB instance.

VPC Considerations

When you stop a DB instance it retains its DNS endpoint. If you stop a DB instance that is not in an Amazon Virtual Private Cloud (Amazon VPC), Amazon RDS releases the IP addresses of the DB instance. If you stop a DB instance that is in a VPC, the DB instance retains its IP addresses.

Note

You should always connect to a DB instance using the DNS endpoint, not the IP address.

Console

To stop a DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Databases, and then choose the DB instance that you want to stop.

  3. For Actions, choose Stop.

  4. (Optional) In the Stop DB Instance window, choose Yes for Create Snapshot? and enter the snapshot name for Snapshot name. Choose Yes if you want to create a snapshot of the DB instance before stopping it.

  5. Choose Yes, Stop Now to stop the DB instance, or choose Cancel to cancel the operation.

AWS CLI

To stop a DB instance by using the AWS CLI, call the stop-db-instance command with the following parameters:

  • --db-instance-identifier – the name of the DB instance.

Example

stop-db-instance --db-instance-identifier mydbinstance

RDS API

To stop a DB instance by using the Amazon RDS API, call the StopDBInstance operation with the following parameter:

  • DBInstanceIdentifier – the name of the DB instance.