Encryption finding · Software and cloud
AWS KMS Key Rotation Should Be Enabled (KMS.4): Turn It On, or Document the Schedule
Security Hub flagged KMS.4 on a customer managed key. How to enable rotation, rotate imported keys on demand, and document the keys AWS can't rotate for you.
What the scanner said
[KMS.4] AWS KMS key rotation should be enabledcmk-backing-key-rotation-enabledkms_cmk_rotation_enabledCIS AWS Foundations 3.6AWS Security Hub control KMS.4, backed by the AWS Config rule cmk-backing-key-rotation-enabled, fails when a customer managed KMS key does not have automatic rotation turned on. It is rated Medium and maps to CIS AWS Foundations Benchmark v5.0.0 3.6, PCI DSS v4.0.1 3.7.4, and NIST 800-53 SC-12 and SC-28(3). Rotation replaces the key material behind the key while the key ID stays the same, and AWS keeps the earlier material so older data still decrypts. Keys that can't rotate automatically, such as keys with imported material, can never satisfy a check that looks for automatic rotation.
Why it matters
Rotation limits what one exposed piece of key material can unlock: data encrypted after a rotation can't be read with material from before it. AWS notes that KMS keys mostly wrap other keys and are almost never used enough to risk key exhaustion. Most of the pressure comes from reviewers. CIS AWS Foundations Benchmark lists it, PCI DSS 4.0.1 requirement 3.7.4 asks for keys to change at the end of a defined cryptoperiod, and a SOC 2 or supplier review will ask how your encryption keys are managed.
A rotation schedule also gives you a tested way to replace key material, which helps after a suspected exposure. Moving to a new algorithm still means creating a new key and repointing aliases, the same steps as manual rotation below.
The fix
List the keys that fail. Filter the Security Hub findings for KMS.4, or run aws kms list-keys and check each customer managed key with get-key-rotation-status. If the AWS Config recorder role lacks kms:DescribeKey, the rule fails every key, so check that before chasing results. Note each key's origin and type: what you can do depends on whether AWS generated the material, you imported it, or the key is asymmetric.
Turn on automatic rotation for symmetric keys AWS generated. In the KMS console, open the key, choose Key rotation, and enable it with the period your policy sets; the default is 365 days, and any value from 90 to 2,560 days is allowed. From the CLI, run aws kms enable-key-rotation --key-id <key-id> --rotation-period-in-days 365. In Terraform, set enable_key_rotation = true and rotation_period_in_days on the aws_kms_key resource; in CloudFormation, set EnableKeyRotation and RotationPeriodInDays on AWS::KMS::Key. For multi-Region keys, set rotation on the primary key only. Applications keep working unchanged, because the key ID stays the same and AWS decrypts older data with the material that encrypted it.
Rotate imported keys on demand. A key with imported material (often called bring your own key) can't rotate automatically. Import new material that has never been used with this key, wait for it to show as pending rotation, then choose Rotate now on the Key material and rotations tab, or call rotate-key-on-demand, up to 25 times per key. For a multi-Region key, import the same material into every replica before rotating the primary. Keep every earlier version imported and escrowed, because the key stops working if any of its material expires or is deleted.
Rotate asymmetric, HMAC, and custom key store keys manually. These support neither automatic nor on-demand rotation. Create a new key, point the alias and your applications at it, and keep the old key enabled for decryption and verification until nothing depends on it.
Verify. Rerun get-key-rotation-status, confirm a RotateKey event lands in CloudTrail at each rotation, and let Security Hub re-evaluate the control. Keep the status output and the events as the evidence that the finding is closed.
When you can't fix it
Some keys keep failing a rotation check by design. Where your scanner evaluates keys with imported material, they can never pass, because the check looks for automatic rotation and AWS does not offer it for those keys. Your named owner chooses one treatment.
- Remediate by moving the key to AWS-generated material with automatic rotation, where your policy does not require you to hold the key material yourself.
- Mitigate by putting the rotation on a schedule a person owns: a written cryptoperiod, a dated re-import and on-demand rotation, the material escrowed offline, and an alert if the date passes.
- Accept the scanner result, while rotation continues on your schedule, with a record the reviewer can read: the key ID, why automatic rotation isn't available (for example, a requirement to control the key material), the rotation schedule and the date of the last rotation, who performs it, and a review date. Suppress the finding in Security Hub, or mute it in your scanner, with the same written reason, so it stays visible in every report as accepted. For keys in PCI scope, the scheduled rotation is what meets requirement 3.7.4; the acceptance covers only the automated check.
The post Compensating Controls for Legacy Systems covers how to write the record an assessor accepts.
Amazon Web Services, AWS, and AWS Key Management Service are trademarks of Amazon.com, Inc. or its affiliates. FEDLIN is not affiliated with or endorsed by Amazon Web Services.
Where it lands in the Risk Register
| Finding | Treatment | Owner | Evidence |
|---|---|---|---|
| Customer managed KMS key without automatic rotation, by key ID and account | Remediate, mitigate, or accept (the owner decides) | Named by you | get-key-rotation-status for each key, RotateKey events in CloudTrail, and for keys AWS can't rotate automatically, the written schedule and the date of the last rotation. Maps to CIS AWS Foundations 3.6, NIST 800-53 SC-12 and SC-28(3), and PCI DSS v4.0.1 3.7.4. |
Common questions
How often should AWS KMS keys be rotated?
As often as your policy's cryptoperiod says. Automatic rotation defaults to every 365 days, and you can set any period from 90 to 2,560 days. PCI DSS 4.0.1 requirement 3.7.4 asks you to define the cryptoperiod and rotate at its end, so the number matters less than writing it down and meeting it. Some policies set 90 days, the shortest period AWS allows. A kms:RotationPeriodInDays condition in your key policies can enforce the minimum you choose.
Does AWS KMS key rotation re-encrypt my data?
No. Rotation changes the key material behind the same key ID. AWS KMS keeps every earlier version and picks the right one to decrypt older data, so nothing is re-encrypted and no code changes. It also does not rotate the data keys your services generated, so it does not help if a data key itself was exposed.
Can I rotate a KMS key with imported key material?
Not automatically, which is why scanner checks that look for automatic rotation, such as Prowler's kms_cmk_rotation_enabled, flag it. You import new key material, and once it shows as pending rotation you run an on-demand rotation, up to 25 times per key. Every earlier version of the material has to stay imported, because the key stops working if any of its material expires or is deleted.
How do I enable KMS key rotation in Terraform?
On the aws_kms_key resource, set enable_key_rotation = true, and optionally rotation_period_in_days to a value from 90 to 2560. Apply, then confirm with aws kms get-key-rotation-status for the key.
What does KMS key rotation cost?
AWS KMS adds a monthly charge for the first and second rotation of a key's material, and stops adding charges after the second rotation. See the AWS KMS pricing page for the current rate.
Do I need to rotate AWS managed keys?
No. AWS rotates AWS managed keys every year, and you cannot change that. KMS.4 is about customer managed keys, the ones your team created.
Related reading
Need the finding closed, or documented so it stays open with your assessor's acceptance?
Found in a customer security review? Reviews can now also carry the CISA, NSA and ASD post-quantum vendor questions, and both answers start from an inventory of the cryptography you run. See Post-Quantum Readiness →