Releasing an instance is permanent and irreversible. The instance, its system disk, local disks, and any data disks configured for release cannot be recovered after release. Back up all data before you proceed.
GPU-accelerated instances are a type of Elastic Compute Service (ECS) instance. Release them when they're no longer needed to stop incurring charges.
This topic covers how to release pay-as-you-go GPU-accelerated instances (including preemptible instances) and expired subscription GPU-accelerated instances.
Before you release: what gets deleted and what persists
Review this table before releasing to avoid unexpected data loss or charges.
| Resource | What happens on release |
|---|---|
| System disk | Deleted |
| Local disks | Deleted |
| Data disks configured for release | Deleted |
| Automatic snapshots set for deletion with the associated cloud disk | Deleted |
| Static public IP address | Reclaimed — cannot be recovered |
| Data disks not configured for release | Retained — continues to incur charges |
| EIPs not configured for release | Retained — continues to incur charges |
| Snapshots not configured for release | Retained — continues to incur charges |
To preserve data: Create a snapshot or create a custom image before releasing the instance.
To keep the public IP address: Convert the static public IP address to an Elastic IP Address (EIP) before releasing the instance.
To avoid unexpected charges after release: Check your billing to identify and release any retained billable resources.
Release a pay-as-you-go instance
Console
Go to the ECS console - Instances page. Select the region and resource group of the target instance.
In the Actions column for the target instance, click
> Instance Status > Release.In the Release Instance dialog box, select a Release Settings option and click Next.
Option Behavior Release Now Releases the instance immediately. Scheduled Release Releases the instance automatically at a specified time. Read the on-screen prompts, confirm which associated resources will be released and which will be retained, and click OK.
API
| Goal | Operation |
|---|---|
| Release a single instance | Call DeleteInstance |
| Release one or more instances | Call DeleteInstances |
Release a subscription instance
Only expired subscription instances can be released. To release a subscription instance that has not expired, first switch its billing method to pay-as-you-go.
Console
Go to the ECS console - Instances page. Select the region and resource group of the target instance.
In the Actions column for the target instance, click
> Instance Status > Release.In the Release dialog box, set Release Settings to Release Now and click Next.
Read the on-screen prompts, confirm which associated resources will be released and which will be retained, and click OK.
API
| Goal | Operation |
|---|---|
| Release a single instance | Call DeleteInstance |
| Release one or more instances | Call DeleteInstances |
When releasing expired subscription instances, set TerminateSubscription=true in the request.Release protection
Release protection blocks all manual release requests from the console, API, and CLI. Enable it on production instances to prevent accidental deletion.
Release protection applies only to pay-as-you-go instances and only blocks manual operations. It does not prevent automatic releases in the following scenarios:
The instance is reclaimed due to an overdue payment.
A scheduled release task fires.
The instance is forcibly released for violating platform security rules (for example, using an ECS instance to host an illegal website).
The Auto Scaling group the instance belongs to triggers a scale-in.
Enable release protection
Console
Go to the ECS console - Instances page. Select the region and resource group of the target instance.
In the Actions column for the target instance, click
> Instance Attributes > Enable Release Protection.Click OK.
API
Call ModifyInstanceAttribute and set DeletionProtection to true.
Expected result: Any subsequent attempt to release the instance returns the InvalidOperation.DeletionProtection error code.
Disable release protection
Console
Go to the ECS console - Instances page. Select the region and resource group of the target instance.
In the Actions column for the target instance, click
> Instance Attributes > Disable Release Protection.Click OK.
API
Call ModifyInstanceAttribute and set DeletionProtection to false.
Check release protection status
Console
Go to the ECS console - Instances page. Select the region and resource group of the target instance.
Click the instance ID to open the instance details page. In the Other Information section, check the Release Protection field.
API
Call DescribeInstances and check Instances.Instance.DeletionProtection. A value of true means release protection is enabled.
Apply in production
Follow these practices to protect production instances:
Enable release protection on all production instances. This prevents accidental deletion of critical resources.
Restrict release permissions. Grant
ecs:DeleteInstanceandecs:DeleteInstancesonly to authorized personnel. Assign the permission to disable release protection (ecs:ModifyInstanceAttribute) to a separate role so that no single person can both disable protection and delete an instance.Enable ActionTrail to audit all account operations. Configure alert rules for high-risk API calls such as
DeleteInstanceandModifyInstanceAttributeto receive immediate notifications and support incident response.
FAQ
Why is the Release button grayed out?
The instance is likely an unexpired subscription instance. Switch its billing method to pay-as-you-go first, then release it.
What is the difference between stopping and releasing an instance?
Stop shuts down the instance — like powering off a computer. The instance remains in the list and you can start it again at any time.
Release permanently deletes the instance, its system disk, local disks, and any data disks configured for release. The data cannot be recovered and the instance is removed from the list.
Can I recover an accidentally released instance?
No. Release is permanent. The system retains no data or configuration from a released instance. Always back up data before releasing.
I released an instance, but I'm still being charged. Why?
Releasing an instance does not automatically release its associated resources. Check your billing for independently billed resources such as cloud disks, EIPs, or snapshots that were not configured for release.
How do I release multiple instances at once?
Console: Use batch operations on the Instances page.
API: Call DeleteInstances.
How do I cancel a scheduled release?
On the ECS console - Instances page, click the instance ID to open its details page. In the Basic Information section, find Auto-release Time and click Cancel.
