View a markdown version of this page

Stopping and starting a DB instance in a reservation - Amazon Relational Database Service

Stopping and starting a DB instance in a reservation

When you stop a DB instance that is using reserved capacity, the instance stays associated with the reservation, but the capacity it was using is released back to the reservation for other DB instances to use. Stopping a DB instance does not hold capacity aside for it.

Because the association persists, starting the instance again returns it to the same reservation – you don't need to specify the reservation on start. Amazon RDS places it back into the reservation using whatever capacity is available at that point.

Important

Reserved capacity is targeted, so a start that returns a DB instance to its reservation fails if the reservation has no available capacity in that DB instance's Availability Zone. It does not fall back to On-Demand capacity. Because stopping the instance releases the capacity, another DB instance can take it while the instance is stopped. If you depend on being able to restart into the reservation, avoid launching other DB instances into that capacity in the meantime.

Stopping a DB instance doesn't change what the reservation costs. The reservation is billed for its full reserved capacity whether DB instances are running in it, so capacity left unused while your instance is stopped appears as an unused reservation charge.

To drop the association as well, release the reserved capacity when you stop the instance. The instance is then no longer associated with the reservation, so it starts as a normal On-Demand instance the next time you start it, unless you specify a reservation on start. To place a stopped DB instance into a reservation, or to move it into a different one, specify the reservation when you start it.

To stop a DB instance in a reservation
  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 temporarily.

  4. In the Stop DB instance temporarily window, under Acknowledgement, select the check box.

  5. (Optional) To drop the association with the reservation, under Additional actions, select Release reserved capacity. If you don't select it, the DB instance stays associated with the reservation and returns to it when you start the DB instance.

    The "Stop DB instance temporarily" window, with the "Release reserved capacity" check box under "Additional actions - optional".
  6. Choose Stop temporarily.

To start a DB instance in a reservation
  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 stopped DB instance that you want to start.

  3. For Actions, choose Start.

  4. (Optional) To place the DB instance into a reservation, or to move it into a different one, for Specify capacity reservation, choose the reservation. If you keep No capacity reservation selected, a DB instance that is still associated with a reservation returns to that reservation.

    The Start DB instance window, with the Specify Capacity Reservation list.
  5. Choose Start DB instance.

To also remove the association with the reservation when you stop the DB instance, add --detach-from-db-capacity-reservation to the stop-db-instance command:

aws rds stop-db-instance \ --db-instance-identifier my-db-instance \ --detach-from-db-capacity-reservation

To place a stopped DB instance into a reservation, or to move it into a different one, specify the reservation in the start-db-instance command:

aws rds start-db-instance \ --db-instance-identifier my-db-instance \ --db-capacity-reservation-identifier my-reservation

The start fails if the reservation you specify has no available capacity in that DB instance's Availability Zone. This is the same as when a DB instance returns to its existing reservation.

To drop the association when you stop a DB instance, set DetachFromDBCapacityReservation to true in the StopDBInstance operation.

To place a stopped DB instance into a reservation, or to move it into a different one, specify DBCapacityReservationIdentifier in the StartDBInstance operation.