Profile Applicability:
- Level 1
Description:
Amazon DocumentDB provides deletion protection to prevent accidental deletion of clusters. When deletion protection is enabled, the DocumentDB cluster cannot be deleted via the AWS Management Console, AWS CLI, or API unless the deletion protection is disabled first. This SOP ensures that DocumentDB clusters have deletion protection enabled to prevent the accidental loss of critical data and infrastructure.
Rationale:
Data Integrity: Ensures that critical data stored in DocumentDB clusters is protected from accidental deletion.
Operational Security: Prevents unauthorized or accidental deletion of database clusters, ensuring that business-critical systems remain operational.
Disaster Recovery: Helps to avoid unintentional loss of infrastructure, especially for production systems.
Compliance: Meets security and operational guidelines for safeguarding data and systems.
Impact:
Pros:
Prevents Accidental Deletion: Deletion protection ensures that clusters cannot be accidentally removed, reducing the risk of data loss.
Increased Data Availability: The feature ensures that critical databases are always available and can be recovered in case of failure.
Improved Security: Adds an extra layer of security for database clusters to protect against malicious actions or human error.
Cons:
Management Overhead: While helpful, deletion protection introduces an additional step to disable protection when legitimate deletion of a cluster is required.
Operational Complexity: Administrators must ensure they manage deletion protection settings when performing maintenance or cleanup tasks.
Default Value:
By default, deletion protection is disabled for DocumentDB clusters. It must be explicitly enabled at the time of cluster creation or modified afterward.
Pre-requisite:
AWS IAM Permissions:
rds:DescribeDBClusters
rds:ModifyDBCluster
AWS CLI installed and configured.
Ensure that you have the correct permissions to manage DocumentDB clusters.
Test Plan:
Using AWS Console:
Sign in to the AWS Management Console.
Navigate to Amazon DocumentDB under Services.
In the DocumentDB Dashboard, go to Clusters.
Select the DocumentDB cluster you want to check.
In the Configuration tab, check the Deletion Protection setting:
If Deletion Protection is enabled, it will show Enabled.
If Deletion Protection is disabled, it will show Disabled.
Using AWS CLI:
To check if deletion protection is enabled for a DocumentDB cluster, run the following command:
aws rds describe-db-clusters --query 'DBClusters[*].{ClusterIdentifier:DBClusterIdentifier,DeletionProtection:DeletionProtection}'
Review the output:
If DeletionProtection is true, deletion protection is enabled for the cluster.
If DeletionProtection is false, deletion protection is not enabled.
Implementation Steps:
Using AWS Console:
Log in to the AWS Management Console and navigate to Amazon DocumentDB.
In the DocumentDB Dashboard, select Clusters and choose the DocumentDB cluster you want to enable deletion protection for.
Click Modify.
Under the Deletion Protection section, enable Deletion Protection.
Click Continue, then Apply Changes to enable deletion protection.
Using AWS CLI:
To enable deletion protection for an existing DocumentDB cluster, run:
aws rds modify-db-cluster --db-cluster-identifier <db-cluster-id> --deletion-protection --apply-immediately
To verify that deletion protection has been enabled, run:
aws rds describe-db-clusters --query 'DBClusters[*].{ClusterIdentifier:DBClusterIdentifier,DeletionProtection:DeletionProtection}'
Backout Plan:
Using AWS Console:
If enabling Deletion Protection causes issues, sign in to the AWS Management Console.
Navigate to Amazon DocumentDB, select the cluster, and click Modify.
Disable Deletion Protection and save the changes.
Monitor the cluster to ensure that Deletion Protection is now disabled and that it is possible to delete the cluster if needed.
Using AWS CLI:
To disable Deletion Protection, run:
aws docdb modify-db-cluster --db-cluster-identifier <CLUSTER_ID> --no-deletion-protection --apply-immediately
Verify that Deletion Protection is disabled:
aws docdb describe-db-clusters --db-cluster-identifier <CLUSTER_ID>