You can enable release protection for pay-as-you-go instances to prevent potential irreversible consequences arising from accidental manual instance release. This topic describes how to enable and disable release protection for ECS instances, how to check whether release protection is enabled, and how release protection is implemented.
Prerequisites
Background information
- A payment in your account is overdue for more than 15 days.
- The automatic release time that you set for the instance has been reached.
- The instance does not comply with the applicable security compliance policies.
- The instance was automatically created by Auto Scaling and is removed by subsequent scale-in events.
- When you attempt to manually release instances in the ECS console, instances with
release protection enabled are automatically skipped.
- When you attempt to manually release instances in the ECS console, the selected instances
cannot be released if they all have release protection enabled.
- The
InvalidOperation.DeletionProtection
error code is returned if you attempt to call the DeleteInstance operation to release an instance with release protection enabled.
Enable release protection when you create an instance
This section describes how to configure release protection settings when you create an instance. For more information about how to create an instance, see Create an instance by using the provided wizard.
When you call the RunInstances or CreateInstance operation to create an instance, you can enable or disable release protection for the instance by setting the DeletionProtection parameter.
Change the release protection settings
You can also enable or disable release protection for an instance by modifying the attributes of the instance.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- On the Instances page, use one of the following methods to change the release protection settings
of instances:
- Change the release protection settings of a single instance: Find the instance for which you want to change the release protection setting, and choose Actions column. in the
- Change the release protection settings of one or more instances: Select multiple instances and choose in the lower part of the Instances page.
- In the Change Release Protection Setting dialog box, turn on or off Release Protection.
- Click OK.
When you call the ModifyInstanceAttribute operation to modify the attributes of an instance, you can enable or disable release protection for the instance by setting the DeletionProtection parameter.