Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Stopping and Starting a DB Instance

You can stop and start Amazon RDS for MySQL, MariaDB, PostgreSQL, Oracle, and SQL Server DB instances. If you use a DB instance intermittently, such as when creating a DB instance for temporary testing or for a daily development activity, stopping and starting can be a preferable to creating a DB snapshot, deleting the DB instance, and then restoring the DB instance from the DB snapshot.

Stopping a DB instance has several advantages over restoring from a DB snapshot. Restarting a DB instance is faster than restoring from a DB snapshot. When starting the DB instance, it is restored to the same configuration as when it was stopped, including its endpoint, DB parameter group, security group, and option group membership. 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. Amazon RDS also retains all the automatic backups made while the DB instance is stopped, based on your backup retention period.

You can stop and start a DB instance running in a Single-AZ deployment that is not part of a Read Replica configuration. You can stop a DB instance for up to seven days. If the DB instance is not started after seven days, the DB instance is automatically started.

Stopping and starting a DB instance is supported for all DB instance types and in all AWS regions with the following exceptions:

  • You cannot stop a DB instance that has a Read Replica, or that is a Read Replica.

  • You cannot stop a DB instance that is in a Multi-AZ deployment.

  • You cannot stop a DB instance that uses SQL Server Mirroring.

Stopping a DB Instance

When you stop a DB instance, Amazon RDS shuts it down. We don't charge hourly usage for a stopped DB instance and we don't charge data transfer fees, but we do charge for the instance storage and backup retention storage. For more information about costs, go to the Pricing section of the Amazon Relational Database Service (Amazon RDS) product page.

When you stop a DB instance, the DB instance performs a normal shutdown and stops running. Its status 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.

If the DB instance is not in an Amazon Virtual Private Cloud (Amazon VPC), we release the public and private IP addresses for the instance when you stop the instance. If the DB instance was in a VPC, the instance retains its private IP address and its public IP address (if the VPC was publicly accessible). Note that you should always connect to a DB instance using the DNS endpoint, not the IP address.

When you stop a DB instance, a DB snapshot of the instance can be created. To stop a DB instance, use one of the following procedures:

AWS Management 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 Instances.

  3. Select the check box next to the DB instance you want to stop.

  4. For Instance Actions, choose Stop.

  5. Choose Continue.

CLI

To stop a DB instance

  • Use the command stop-db-instance with the AWS CLI to stop an instance.

    Copy
    PROMPT>aws rds stop-db-instance --db-instance-identifier mydbinstance

API

To stop a DB instance

  • Call StopDBInstance with the following parameter:

    • DBInstanceIdentifier = mydbinstance

    Example

    Copy
    https://rds.amazonaws.com/ ?Action=StopDBInstance &DBInstanceIdentifier=mydbinstance &SignatureVersion=2 &SignatureMethod=HmacSHA256 &Timestamp=2009-10-14T22%3A20%3A46.297Z &AWSAccessKeyId=<AWS Access Key ID> &Signature=<Signature>

Working with a Stopped DB Instance

While a DB instance is stopped, you can delete the instance but the following things cannot happen:

  • The DB instance cannot be modified.

  • The DB instance cannot be modified to be in a Multi-AZ deployment.

  • The DB instance cannot connect to a Read Replica.

  • You cannot delete a DB parameter group that is associated with a stopped DB instance.

In addition, Amazon RDS automatically backs up a stopped DB instance. You continue to be charged for the storage used by the DB instance and for the storage for any DB instance backups that you have been kept, based on your automatic backup retention period.

In general, you cannot 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 stopped instances. For example, calling the rds_remove_option_from_option_group command fails on a persistent option in an option group associated with a DB instance in the stopping, stopped, or starting state.

However, you can make changes to the option group that is associated with a stopped DB instance. If you choose to apply the changes immediately, then Amazon RDS applies the changes the next time the DB instance is started. Otherwise, Amazon RDS applies the changes during the next maintenance window after the stopped DB instance is started.

You can also make changes to the parameter group that is associated with a stopped DB instance. If you choose to apply the changes immediately, then Amazon RDS applies the changes the next time the stopped DB instance is started. Otherwise Amazon RDS applies the changes during the next maintenance window after the stopped DB instance is started.

Starting a Stopped DB Instance

A stopped DB instance that is started retains its instance ID, Domain Name Server (DNS) endpoint, parameter group, security group, and option group. When you start a stopped instance, we charge a full instance hour.

If the started DB instance was not in an Amazon VPC, Amazon RDS assigns new public and private IP addresses to the instance. If the started DB instance was in a VPC, the instance retains its private IP address and its public IP address (if the VPC was publicly accessible).

AWS Management Console

To start 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 Instances.

  3. Select the check box next to the DB instance you want to start.

  4. For Instance Actions, choose Start.

  5. Choose Continue.

CLI

To start a DB instance

  • Use the command start-db-instance with the AWS CLI to start an instance.

    Copy
    PROMPT>aws rds start-db-instance --db-instance-identifier mydbinstance

API

To start a DB instance

  • Call StartDBInstance with the following parameter:

    • DBInstanceIdentifier = mydbinstance

    Example

    Copy
    https://rds.amazonaws.com/ ?Action=StartDBInstance &DBInstanceIdentifier=mydbinstance &SignatureVersion=2 &SignatureMethod=HmacSHA256 &Timestamp=2009-10-14T22%3A20%3A46.297Z &AWSAccessKeyId=<AWS Access Key ID> &Signature=<Signature>

Related Topics