Resource Orchestration Service (ROS) provides the deletion protection feature for you to prevent your stacks from being accidentally deleted. After you enable deletion protection for a stack, the stack cannot be deleted.

Prerequisites

The permissions on deletion protection are granted to your account. You can call the ros:SetDeletionProtection operation to enable deletion protection. For more information, see Use RAM to control resource access.

Background information

You cannot enable deletion protection for stacks that are being deleted. The deletion protection property of a nested stack is the same as that of its parent stack and cannot be changed. If you want to enable deletion protection for a nested stack, you must enable deletion protection for its parent stack.

Enable deletion protection when you create a stack

  1. Log on to the ROS console.
  2. In the left-side navigation pane, click Stacks.
  3. In the upper-left corner, select the region where you want to deploy your stack from the drop-down list.
  4. On the Stacks page, click Create Stack and select Use New Resources (Standard) from the drop-down list.
  5. In the Select Template step, specify a template and click Next.
  6. In the Configure Template Parameters step, set Stack Name, specify other parameters, and then click Next.
  7. In the Configure Stack step, select Enabled as Deletion Protection.
    • Enabled: enables deletion protection.
    • Disabled: disables deletion protection.
  8. Click Next.
  9. In the Check and Confirm step, click Create.

Enable deletion protection for an existing stack

  1. Log on to the ROS console.
  2. In the left-side navigation pane, click Stacks.
  3. In the upper-left corner, select the region where your stack is deployed from the drop-down list.
  4. On the Stacks page, find the stack and click the stack ID in the Stack Name column.
  5. In the Basic Information section on the Stack Information tab, turn on Deletion Protection.
    Note You can also turn off Deletion Protection to disable deletion protection.

Enable deletion protection for a nested stack

To enable deletion protection for a nested stack, you must enable deletion protection for its parent stack.

  1. Log on to the ROS console.
  2. In the left-side navigation pane, click Stacks.
  3. In the upper-left corner, select the region where your nested stack is deployed from the drop-down list.
  4. On the Stacks page, select Show Nested Stacks.
  5. On the Stacks page, find the nested stack and click the stack ID in the Stack Name column.
  6. In the Basic Information section on the Stack Information tab of the nested stack, click the parent stack ID.
  7. In the Basic Information section on the Stack Information tab of the parent stack, turn on Deletion Protection.
    Note You can also turn off Deletion Protection to disable deletion protection.