CloudFormation stacks should have termination protection enabled

Description

CloudFormation stacks should have termination protection enabled to prevent accidental deletion. Termination protection helps protect critical infrastructure from unintended removal, which could cause service outages or data loss.

Remediation

Enable termination protection for your CloudFormation stack using the AWS Console or CLI.

From the console

  1. Open the AWS CloudFormation console.
  2. Select the stack you want to protect.
  3. Choose Stack actions, then Edit termination protection.
  4. Select Enabled and choose Save.

From the command line

aws cloudformation update-termination-protection \
    --stack-name <stack-name> \
    --enable-termination-protection