Skip to main content

More Info:

Amazon DynamoDB tables should be using AWS-managed Customer Master Keys (CMKs) instead of AWS-owned CMKs for Server-Side Encryption (SSE), in order to meet strict encryption compliance and regulatory requirements. DynamoDB supports to switch from AWS-owned CMKs to customer-managed CMKs managed using Amazon Key Management Service (KMS), without any code to encrypt the data.

Risk Level

Medium

Address

Security

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
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • GDPR
  • HIPAA
  • ISO 27001
  • 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
  • Reserve Bank of India (RBI) Cyber Security Framework
  • SOC2
  • 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 AWS DynamoDB tables not using KMS CMKs for encryption, you can follow these steps using the AWS Management Console:
  1. Sign in to the AWS Management Console: Go to the AWS Management Console and sign in to your account.
  2. Navigate to DynamoDB: From the services menu, select DynamoDB to access the DynamoDB dashboard.
  3. Select the DynamoDB Table: Locate the DynamoDB table that you want to remediate and click on its name to open the table details.
  4. Configure Encryption: In the table details, click on the “Manage” tab and then select the “Encryption” option.
  5. Enable Server-Side Encryption: In the Encryption settings, select the option to enable server-side encryption.
  6. Choose KMS CMK: Choose the option to use a KMS key to encrypt the DynamoDB table. You can either select an existing KMS CMK or create a new one.
  7. Save Changes: Once you have selected the appropriate KMS CMK, save the changes to apply the encryption settings to the DynamoDB table.
  8. Verify Encryption: After saving the changes, verify that the encryption settings have been successfully applied to the DynamoDB table.
By following these steps, you can remediate the misconfiguration of AWS DynamoDB tables not using KMS CMKs for encryption and ensure that the data in the table is encrypted using a KMS key for improved security.

To remediate the misconfiguration of AWS DynamoDB tables not using KMS CMKs for encryption, you can follow these steps using AWS CLI:
  1. List DynamoDB tables without KMS encryption: Run the following command to list all DynamoDB tables that do not use KMS encryption:
  2. Enable encryption with KMS CMK for DynamoDB table: For each DynamoDB table that does not use KMS encryption, you can enable encryption with a KMS CMK by following these steps:
    • Identify the KMS Key ID that you want to use for encryption. You can list the available KMS keys using:
    • Update the DynamoDB table to enable encryption with the chosen KMS key. Replace TABLE_NAME and KMS_KEY_ID with your actual values:
  3. Verify encryption status: You can verify that encryption with KMS CMK has been enabled for the DynamoDB table by describing the table:
  4. Repeat for other DynamoDB tables: Repeat steps 2 and 3 for each DynamoDB table that does not use KMS encryption.
By following these steps, you can remediate the misconfiguration of AWS DynamoDB tables not using KMS CMKs for encryption.
To remediate the misconfiguration of AWS DynamoDB tables not using KMS CMKs for encryption, you can follow these steps using Python and the AWS SDK (boto3):
  1. Install the AWS SDK for Python (boto3) if you haven’t already:
  1. Use the following Python script to update the encryption settings for your DynamoDB tables to use a KMS Customer Master Key (CMK) for encryption:
  1. Replace 'YOUR_KMS_CMK_ARN' with the ARN of the KMS CMK that you want to use for encryption.
  2. Run the Python script to update the encryption settings for all DynamoDB tables in your AWS account to use the specified KMS CMK for encryption.
By following these steps, you can remediate the misconfiguration of AWS DynamoDB tables not using KMS CMKs for encryption.
This change updates the table’s server-side encryption from the AWS-owned CMK to the specified customer-managed KMS key without replacing the table; AWS performs the re-encryption in the background while the table remains available.Verification: terraform plan should show an in-place update of aws_dynamodb_table.this.server_side_encryption with enabled = true, sse_type = "KMS", and kms_key_arn changing from the previous value (or null/AWS-owned key) to the ARN of aws_kms_key.dynamodb_sse.

Additional Reading: