Skip to main content

More Info:

Checks if Amazon DocumentDB manual cluster snapshots are public. The rule is NON_COMPLIANT if any Amazon DocumentDB manual cluster snapshots are public.

Risk Level

Medium

Address

Observability

Compliance Standards

  • APRA CPS 234 (Australia)
  • AWS Startup Security Baseline
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • Cloudanix Best Practice
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To remediate the issue of DocumentDB Cluster Snapshots being public in AWS RDS using the AWS Management Console, follow these steps:
  1. Login to AWS Console: Go to the AWS Management Console (https://aws.amazon.com/console/) and log in with your credentials.
  2. Navigate to DocumentDB Service: Click on the “Services” dropdown menu at the top left corner of the console, then select “DocumentDB” under the Database category.
  3. Select DocumentDB Cluster: From the DocumentDB dashboard, select the DocumentDB cluster for which you want to remediate the public snapshot issue.
  4. Modify Snapshot Settings:
    • In the left-hand navigation pane, click on “Snapshots” to view the list of snapshots associated with the selected cluster.
    • Identify the public snapshot(s) that need to be remediated.
    • Select the public snapshot by clicking on the checkbox next to it.
  5. Update Snapshot Permissions:
    • Click on the “Actions” dropdown menu above the list of snapshots.
    • Select “Modify Snapshot Attribute” from the dropdown menu.
    • In the Modify Snapshot Attribute window, uncheck the option for “Public” to make the snapshot private.
    • Click on the “Modify Snapshot Attribute” button to save the changes.
  6. Verify Changes:
    • Once the modification is complete, verify that the snapshot is no longer public by checking the snapshot permissions.
    • You can also try accessing the snapshot URL to confirm that it is no longer accessible publicly.
  7. Repeat for Other Public Snapshots: If there are multiple public snapshots across different clusters, repeat the above steps for each affected snapshot to ensure all snapshots are private.
By following these steps, you can remediate the issue of DocumentDB Cluster Snapshots being public in AWS RDS using the AWS Management Console.

To remediate the issue of DocumentDB Cluster Snapshots being public in AWS RDS, you can follow these steps using the AWS CLI:Step 1: List all the DocumentDB Cluster Snapshots
Step 2: Modify the permissions of the DocumentDB Cluster Snapshots to make them private
Replace <snapshot-identifier> with the identifier of the DocumentDB Cluster Snapshot you want to modify.Step 3: Verify that the permissions have been modified successfully
Repeat steps 2 and 3 for each DocumentDB Cluster Snapshot that needs to be remediated.By following these steps, you can ensure that your DocumentDB Cluster Snapshots are no longer public and have the appropriate permissions set to maintain the security of your AWS RDS resources.
To remediate the issue of DocumentDB cluster snapshots being public in AWS RDS using Python, you can follow these steps:
  1. Identify the Public Snapshots: Use the AWS SDK for Python (Boto3) to list all the DocumentDB cluster snapshots in your account and identify which snapshots are public.
  2. Modify Snapshot Permissions: For each public snapshot identified, modify the permissions to make them private. You can do this by removing the “all” permission grants and adding specific AWS account IDs or IAM roles that should have access to the snapshots.
Here is a sample Python script to help you achieve this:
Make sure to install the boto3 library by running pip install boto3 before executing the script.This script will identify all public DocumentDB cluster snapshots and modify their permissions to make them private. Make sure to run this script with appropriate AWS credentials and permissions to modify the snapshot attributes.
Terraform cannot currently manage the restore attribute (sharing permissions) of Amazon DocumentDB manual cluster snapshots, so it cannot implement the equivalent of:
You must remediate this outside Terraform:
  1. Using AWS CLI (recommended for automation):
    Substitute:
    • DOCDB_SNAPSHOT_IDENTIFIER with your snapshot ID.
    • AWS_REGION with the region of the snapshot.
  2. Or via Console (manual):
    • Go to Amazon DocumentDB → “Snapshots”.
    • Select the manual cluster snapshot.
    • Choose “Share snapshot”.
    • Remove all from the list of accounts.
    • Save.
This change does not affect the aws_docdb_cluster resource itself, so terraform plan will show no changes; verification must be via aws docdb describe-db-cluster-snapshot-attributes or the Console sharing settings.

Additional Reading: