More Info:
When you enable automatic key rotation, AWS KMS rotates the CMK 365 days after the enable date and every 365 days thereafter.Risk Level
MediumAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Well Architected Framework
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS AWS
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- GDPR
- HIPAA
- HITRUST CSF
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST
- NIST CSF
- 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
- SOC2
- 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
Remediation
Using Console
Using Console
Sure, here are the step-by-step instructions to remediate the KMS Key Rotation misconfiguration in AWS using the AWS console:
- Log in to your AWS Management Console.
- Navigate to the AWS Key Management Service (KMS) dashboard.
- Select the KMS key that needs to be remediated.
- Click on the “Key policy” button to view the key policy.
- In the key policy, locate the “KeyRotationEnabled” statement. If it is not present, add it to the key policy.
- Set the value of “KeyRotationEnabled” to “true”.
- Click on the “Save changes” button to save the updated key policy.
Using CLI
Using CLI
To remediate the misconfiguration “KMS Key Rotation Should Be Enabled” for AWS using AWS CLI, follow these steps:Note: Replace Note: Replace Note: Replace
- Open the AWS CLI on your local machine or in the AWS Management Console.
- Check if the KMS key rotation is enabled or not using the following command:
<key-id> with the ID of the KMS key for which you want to check the rotation status.- If the key rotation is not enabled, enable it using the following command:
<key-id> with the ID of the KMS key for which you want to enable the rotation.- Verify if the key rotation is enabled using the following command:
<key-id> with the ID of the KMS key for which you want to check the rotation status.- Repeat steps 2-4 for all the KMS keys in your AWS account.
Using Python
Using Python
To remediate KMS Key Rotation Should Be Enabled in AWS, you can use the following steps in Python:
- Import the necessary libraries:
- Create a boto3 client for AWS Key Management Service:
- Get a list of all KMS keys:
- Loop through each key and check if key rotation is enabled:
- Save the Python script and run it to enable key rotation for all KMS keys.
Using Terraform
Using Terraform
THIS_KMS_KEYwith your Terraform resource name.PURPOSE_DESCRIPTIONwith a description of the key’s use.
enable_key_rotation from false to true is an in‑place update and does not force key replacement.To verify, terraform plan should show a single in‑place update on the aws_kms_key resource with:
