DynamoDB tables should have deletion protection enabled
Checks that deletion protection is turned on for the DynamoDB table. While it is on, no one can delete the table, whatever their IAM permissions, which stops an accidental deletion during routine table management from disrupting the applications that depend on it.
- service
- DynamoDB
- severity
- Medium
- scope
- evaluated in every region
How to fix it
- Can break clients: While it is on, every attempt to delete the table fails, including stack or environment teardowns, until someone turns it off.
In the console
DynamoDB → Tables → the table → Additional settings → Deletion protection
- Deletion protection
- On (Enable delete protection)
With the AWS CLI
aws dynamodb update-table --table-name <table-name> --deletion-protection-enabled --region <region>With Terraform
resource "aws_dynamodb_table" "this" {
name = var.table_name
deletion_protection_enabled = true
}
See which of your accounts this check is failing on.
Book a live scan