Skip to main content

Neptune Cluster Should Have Copy Tags For Snapshots Enabled

More Info:​

Checks if an Amazon Neptune cluster is configured to copy all tags to snapshots when the snapshots are created. The rule is NON_COMPLIANT if copyTagsToSnapshot is set to false.

Risk Level​

Medium

Address​

Configuration

Compliance Standards​

  • APRA CPS 234 (Australia)
  • 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
  • UK NCSC Cyber Assessment Framework

Triage and Remediation​

Remediation​

Using Console

To remediate the misconfiguration of Neptune Cluster not having copy tags for snapshots enabled in AWS RDS using the AWS Management Console, follow these step-by-step instructions:

  1. Sign in to the AWS Management Console: Go to https://aws.amazon.com/ and sign in to the AWS Management Console using your credentials.

  2. Navigate to the Amazon Neptune Console: Click on the "Services" dropdown at the top left corner of the AWS Management Console, then select "Neptune" under the Database category.

  3. Select the Neptune Cluster: From the list of Neptune clusters, click on the name of the cluster that needs to have copy tags for snapshots enabled.

  4. Enable Copy Tags for Snapshots:

    • In the Neptune Cluster dashboard, click on the "Snapshots" tab in the navigation pane on the left.
    • Click on the "Modify" button at the top of the page to modify the cluster settings.
    • In the Modify cluster page, scroll down to the "Backup" section.
    • Look for the option "Copy tags to snapshots" and check the box to enable this feature.
    • Click on the "Apply immediately" checkbox if you want the changes to take effect immediately.
    • Click on the "Modify Cluster" button to save the changes.
  5. Verify Configuration:

    • Once the modification is complete, go back to the Neptune Cluster dashboard.
    • Click on the "Snapshots" tab again and select an existing snapshot or create a new one.
    • Verify that the tags from the Neptune Cluster are copied to the snapshot.

By following these steps, you have successfully enabled copy tags for snapshots for the Neptune Cluster in AWS RDS using the AWS Management Console.

Using CLI

To remediate the misconfiguration of Neptune Cluster not having Copy Tags For Snapshots enabled in AWS RDS using AWS CLI, you can follow these steps:

  1. Identify the Neptune Cluster: First, you need to identify the Neptune Cluster for which you want to enable the Copy Tags For Snapshots option. You can do this by running the following AWS CLI command:

    aws neptune describe-db-clusters --db-cluster-identifier YOUR_CLUSTER_IDENTIFIER
  2. Enable Copy Tags For Snapshots: Once you have identified the Neptune Cluster, you can enable the Copy Tags For Snapshots option by running the following AWS CLI command:

    aws neptune modify-db-cluster --db-cluster-identifier YOUR_CLUSTER_IDENTIFIER --copy-tags-to-snapshot
  3. Verify the Configuration: To verify that the Copy Tags For Snapshots option has been successfully enabled for the Neptune Cluster, you can run the following AWS CLI command:

    aws neptune describe-db-clusters --db-cluster-identifier YOUR_CLUSTER_IDENTIFIER

By following these steps and using the AWS CLI commands provided, you can successfully remediate the misconfiguration of Neptune Cluster not having Copy Tags For Snapshots enabled in AWS RDS.

Using Python

To remediate the misconfiguration of Neptune Cluster not having Copy Tags for Snapshots enabled in AWS RDS using Python, you can follow these steps:

  1. Install the AWS SDK for Python (Boto3) if you haven't already. You can install it using pip:

    pip install boto3
  2. Use the following Python script to enable the "Copy Tags for Snapshots" attribute for your Neptune Cluster:

import boto3

# Initialize the RDS client
client = boto3.client('rds')

# Specify the name of your Neptune Cluster
neptune_cluster_identifier = 'your-neptune-cluster-identifier'

# Enable the Copy Tags for Snapshots attribute
response = client.modify_db_cluster(
DBClusterIdentifier=neptune_cluster_identifier,
CopyTagsToSnapshot=True
)

print('Copy Tags for Snapshots attribute has been enabled for the Neptune Cluster.')
  1. Replace 'your-neptune-cluster-identifier' with the actual identifier of your Neptune Cluster.

  2. Run the Python script. After successful execution, the "Copy Tags for Snapshots" attribute will be enabled for your Neptune Cluster.

By following these steps, you can remediate the misconfiguration of Neptune Cluster not having Copy Tags for Snapshots enabled in AWS RDS using Python.

Using Terraform
resource "aws_neptune_cluster" "THIS_CLUSTER" {
cluster_identifier = "NEPTUNE_CLUSTER_IDENTIFIER" # replace with your cluster identifier

# ...other required arguments like engine, subnet_group_name, iam_roles, etc.

# Enable copying all tags from the cluster to its snapshots
copy_tags_to_snapshot = true
}

This change updates the existing Neptune cluster in place and may be applied during the next maintenance window (or immediately if your apply options force it), but it does not force resource replacement.

To verify, terraform plan should show the aws_neptune_cluster.THIS_CLUSTER resource with:

  • a change from copy_tags_to_snapshot = false (or omitted) to copy_tags_to_snapshot = true.

Additional Reading:​