Cancel a Capacity Reservation - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Cancel a Capacity Reservation

You can cancel a Capacity Reservation at any time if you no longer need the reserved capacity. When you cancel a Capacity Reservation, the capacity is released immediately, and it is no longer reserved for your use.

You can cancel empty Capacity Reservations and Capacity Reservations that have running instances. If you cancel a Capacity Reservation that has running instances, the instances continue to run normally outside of the capacity reservation at standard On-Demand Instance rates or at a discounted rate if you have a matching Regional Reserved Instance.

After you cancel a Capacity Reservation, instances that target it can no longer launch. Modify these instances so that they either target a different Capacity Reservation, launch into any open Capacity Reservation with matching attributes and sufficient capacity, or avoid launching into a Capacity Reservation. For more information, see Modify a stopped instance's Capacity Reservation settings.

To cancel a Capacity Reservation using the console
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. Choose Capacity Reservations and select the Capacity Reservation to cancel.

  3. Choose Cancel reservation, Cancel reservation.

To cancel a Capacity Reservation using the Amazon CLI

Use the cancel-capacity-reservation command:

For example, the following command cancels a Capacity Reservation with an ID of cr-1234567890abcdef0.

aws ec2 cancel-capacity-reservation --capacity-reservation-id cr-1234567890abcdef0