Description
Automatic rotation creates new key material under the same KMS key ID. Permissions stay in place, and AWS KMS retains the older material to decrypt existing ciphertext.
Potential impact
Without a schedule, a key can exceed your rotation interval. Rotation alone does not revoke compromised access or replace exposed data keys.
Remediation
For a symmetric encryption key with AWS KMS-generated material, set EnableKeyRotation: true. Set RotationPeriodInDays if you need a different interval, then verify the rotation status and history. For unsupported key types, plan a separate replacement that preserves access to existing data. Revoke compromised access and replace exposed data keys separately.
Examples
The second excerpt turns on automatic rotation for the same symmetric key. With no custom period, KMS uses 365 days. Replace the account ARN with the key-owning account and review the key policy.
Before
AWSTemplateFormatVersion: 2010-09-09
Description: A sample template
Resources:
myKey:
Type: AWS::KMS::Key
Properties:
Description: An example symmetric CMK
EnableKeyRotation: false
KeyPolicy:
Version: "2012-10-17"
Id: key-default-1
Statement:
- Sid: Enable IAM User Permissions
Effect: Allow
Principal:
AWS: arn:aws:iam::111122223333:root
Action: kms:*
Resource: "*"
After
AWSTemplateFormatVersion: 2010-09-09
Description: A sample template
Resources:
myKey:
Type: AWS::KMS::Key
Properties:
Description: An example symmetric CMK
EnableKeyRotation: true
KeyPolicy:
Version: "2012-10-17"
Id: key-default-1
Statement:
- Sid: Enable IAM User Permissions
Effect: Allow
Principal:
AWS: arn:aws:iam::111122223333:root
Action: kms:*
Resource: "*"