Skip to main content

More Info:

Your AWS Relational Database Service (RDS) database snapshots should not be publicly accessible. This is to avoid exposing your private data.

Risk Level

Critical

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • AWS Startup Security Baseline
  • AWS Well Architected Framework
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • GDPR
  • HIPAA
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • PCI
  • Reserve Bank of India (RBI) Cyber Security Framework
  • Reserve Bank of India (RBI) Master Direction – Information Technology Framework
  • 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 RDS Database Snapshots being public in AWS, follow these steps using the AWS Management Console:
  1. Sign in to the AWS Management Console: Go to https://aws.amazon.com/ and sign in to your AWS account.
  2. Navigate to the RDS Service: Click on the “Services” dropdown menu at the top of the page, then select “RDS” under the Database category.
  3. Select the RDS Instance: In the RDS dashboard, locate and click on the RDS instance for which you want to secure the snapshots.
  4. Access the Snapshots: In the RDS instance details page, find the “Snapshots” section in the left-hand menu and click on it.
  5. Identify Public Snapshots: Look through the list of snapshots to identify any that are marked as public.
  6. Modify Snapshot Permissions:
    • Click on the checkbox next to the public snapshot(s) that you want to secure.
    • Click on the “Modify Snapshot Permissions” button in the top menu.
    • In the “Modify Snapshot Permissions” window, uncheck the option that allows public access.
    • Click on the “Save Changes” button to apply the new permissions.
  7. Verify Changes:
    • Review the list of snapshots again to ensure that the public snapshots are no longer accessible to the public.
  8. Repeat if Necessary: If you have multiple RDS instances with public snapshots, repeat the above steps for each instance to secure all the snapshots.
By following these steps, you have successfully remediated the issue of RDS Database Snapshots being public in AWS.

To remediate the issue of RDS Database Snapshots being public in AWS using AWS CLI, follow these steps:
  1. List all the RDS database snapshots that are currently public:
  1. Modify the DB snapshot attribute to make it private:
  1. Verify that the DB snapshot attribute has been updated successfully:
By following these steps, you can remediate the misconfiguration of RDS Database Snapshots being public in AWS RDS using AWS CLI.
To remediate the misconfiguration of having RDS database snapshots public in AWS using Python, you can follow these steps:
  1. Identify the Public Snapshots:
    • Use the AWS SDK for Python (Boto3) to list all the RDS database snapshots.
    • Filter out the snapshots that are marked as public.
  2. Update Snapshot Permissions:
    • For each public snapshot identified, modify the snapshot attribute to make it private.
    • Use the modify_db_snapshot_attribute method from the Boto3 RDS client to update the snapshot attribute.
  3. Sample Python Script: Here is a sample Python script that demonstrates how to identify and update public RDS database snapshots to private:
  4. Run the Script:
    • Save the script in a file (e.g., remediate_public_snapshots.py) and run it using Python.
    • Make sure you have the necessary IAM permissions to modify RDS snapshot attributes.
By following these steps and running the Python script, you can remediate the misconfiguration of having public RDS database snapshots in AWS.
Terraform cannot manage RDS DB snapshot restore attributes (including the all public flag), so this specific fix cannot be expressed in Terraform; you must use the AWS CLI or Console exactly as in the provided remediation (modify-db-snapshot-attribute to remove all) and then keep snapshots managed as private from creation time in Terraform.

Additional Reading: