Amazon DocumentDB clusters should have deletion protection enabled
Checks that a DocumentDB cluster has deletion protection enabled, so a request to delete the cluster fails until someone first turns the setting off. It guards against a mistaken or unauthorized delete of the cluster; it does not stop data being dropped from inside the database.
- service
- DocumentDB
- severity
- Medium
- scope
- evaluated in every region
How to fix it
- Affects another check: RDS.7 reads the same setting on this cluster, so enabling it clears that finding too.
In the console
Amazon DocumentDB → Clusters → the cluster → Actions → Modify → Deletion protection
- Enable deletion protection
- Selected
With the AWS CLI
aws docdb modify-db-cluster --db-cluster-identifier <cluster-identifier> --deletion-protection --region <region>With Terraform
resource "aws_docdb_cluster" "this" {
cluster_identifier = var.cluster_identifier
deletion_protection = true
}
See which of your accounts this check is failing on.
Book a live scan