If you no longer need an Elastic Compute Service (ECS) instance, you can release the instance to prevent unnecessary costs. This topic describes how to release a pay-as-you-go or preemptible instance or an expired subscription instance.
Prerequisites
Only pay-as-you-go instances, including preemptible instances and expired subscription instances can be released.
After an instance is released, its data is deleted and cannot be recovered. We recommend that you create snapshots to back up data before you release the instance. For more information, see Create a snapshot for a disk.
After an instance is released, snapshots and images that were manually created from the instance are not affected.
Usage Notes
Unexpired subscription instances cannot be released. Before you can release an unexpired subscription instance, convert the instance into a pay-as-you-go instance. For more information, see Change the billing method of an instance from subscription to pay-as-you-go.
You can manually release expired subscription instances. If you do not renew an expired instance within a specific period of time, the instance is automatically released.
If a pay-as-you-go instance is not stopped in economical mode, billing for the instance continues until the instance is released.
You can enable release protection for a pay-as-you-go instance to prevent irreversible data loss caused by an accidental release operation. For more information, see Enable or disable release protection for ECS instances.
If the Release Disk with Instance feature is disabled for a disk that is attached to an instance, the disk is automatically converted into a pay-as-you-go data disk and retained when the instance is released. For more information, see Release a disk.
Release an instance by using the ECS console
You can release pay-as-you-go instances in the ECS console.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Open the Release dialog box for the instances that you want to release.
To release a single instance, find the instance and choose
in the Actions column.To batch release multiple instances, click the Filter icon at the top of the Billing Method column and select Pay-as-you-go from the drop-down list. In the displayed list of pay-as-you-go instances, select the instances that you want to release and choose
below the instance list.
Release the instances immediately or on a schedule.
In the Release dialog box, set the Release Settings parameter and click Next.
Release Now: If you select Release Now and confirm the release operation, the system immediately releases the instances and stops billing for the instances.
Release on Schedule: If you select Release on Schedule and specify a point in time at which to release the instances, the system releases the instances at the specified point in time and stops billing for them since then.
Confirm the associated resources that you want to release or retain, select I am aware of the instances and their associated resources to be released and understand the data risks, and then click OK.
Confirm the release results and click Close.
After you schedule the release time of an instance, you can click Cancel in the Billing Method column corresponding to the instance to cancel the release settings.
Release multiple instances by using OOS
To batch release multiple instances, we recommend that you use a public template provided by CloudOps Orchestration Service (OOS). To automatically release ECS instances, you can create an execution based on a template and specify the IDs of the ECS instances for the execution. For more information, see Release multiple ECS instances at a time.