This topic describes how to release an ECS instance.

Precautions

You can release a Pay-As-You-Go instance (including a preemptible instance) when you no longer need it to avoid excess charges.
Note After an instance is released, its data cannot be recovered. We recommend that you create a snapshot to back up data before releasing an instance.

For a Pay-As-You-Go instance, if the No fees for stopped VPC instances feature is not enabled, charges continue to incur until the instance is released.

For a Subscription instance, the instance is automatically released after the billing cycle expires.

You can enable instance release protection for a Pay-As-You-Go instance to prevent irreversible data loss resulting from accidental or incorrect operations during a manual release.

Release an instance immediately

To release an instance immediately, follow these steps:

  1. Release the instance:
    • If you want to release only one instance, find the instance that you want to release and then, in the Actions column, choose Manage > Release.
    • If you want to release multiple instances, find the Pay-As-You-Go instances according to the Billing Method, select multiple instances to release, and click Release at the bottom of the list.
  2. In the dialog box, select Release Now.
  3. Click Next, and then click OK.

You can also use the Alibaba Cloud CLI, OpenAPI Explorer, or SDK to call DeleteInstance to release the instance.

Enable automatic release

To enable automatic release, follow these steps:

  1. Release the instance:
    • If you want to release only one instance, find the instance that you want to release, and in the Actions column, choose Manage > Release.
    • If you want to release multiple instances, find the Pay-As-You-Go instances according to the Billing Method, select multiple instances to release, and click Release at the bottom of the list.
  2. In the dialog box, select Scheduled Release.
  3. Turn on the Automatic Release switch, and specify the release date and time. The earliest setting can only be set to automatically release an instance after 30 minutes.

  4. Click Next, and then click OK.

You can also use the Alibaba Cloud CLI, OpenAPI Explorer, or SDK to call ModifyInstanceAutoReleaseTime to set the automatic release time for a Pay-As-You-Go instance.

Disable automatic release

If you want to cancel the automatic release schedule of a Pay-As-You-Go instance, you can disable the feature.

To disable the automatic release feature, follow these steps:

  1. Release the instance:
    • If you want to disable automatic release for an instance, find the instance and then, in the Actions column, choose Manage > Release.
    • If you want to disable automatic release for multiple instances, find the Pay-As-You-Go instances according to the Billing Method, select the target instances, and click Release at the bottom of the list.
  2. In the dialog box, select Scheduled Release.
  3. Turn off the Automatic Release switch.
  4. Click Next, and then click OK.

You can also use the Alibaba Cloud CLI, OpenAPI Explorer, or SDK to call ModifyInstanceAutoReleaseTime to disable automatic release for a Pay-As-You-Go instance.