More Info:

A deletion policy, implemented with the DeletionPolicy attribute, should be used for your Amazon CloudFormation stacks in order preserve or backup AWS resources when the stacks are deleted.

Risk Level

Low

Address

Security, Operational Maturity

Compliance Standards

CBP

Triage and Remediation

Remediation

The CloudFormation deletion policy should be in use to ensure that resources created by CloudFormation are not accidentally deleted.

To remediate this misconfiguration in AWS using the AWS console, follow the below steps:

  1. Go to the AWS CloudFormation console.
  2. Select the stack for which you want to enable deletion protection.
  3. Click on the “Stack actions” button and select “Update stack”.
  4. In the “Specify stack details” page, scroll down to the “Advanced” section.
  5. In the “Deletion policy” section, select the “Retain” option for resources that you want to protect from deletion.
  6. Click on the “Next” button.
  7. In the “Review” page, review the changes and click on the “Update stack” button to apply the changes.

Once the deletion policy is enabled, the resources specified in the policy will not be deleted even if the CloudFormation stack is deleted.

Additional Reading: