Rotating KMS Key Material
This lesson explains the automatic, on-demand and manual rotation options in KMS, which limit the amount of data protected by any one key material and are often required by compliance frameworks.
Learning outcomes
After completing this lesson, you will be able to:
- Choose between automatic, on-demand and manual rotation.
- Explain what rotation does and does not do to existing ciphertext.
- Describe how rotation status is audited across an organisation.
Rotation options
Key rotation replaces a key's cryptographic material, and there are three ways to do it. Automatic rotation applies to symmetric customer managed keys whose material KMS generated. KMS creates new material on a schedule you set, from 90 to 2,560 days (365 by default). The key ID, ARN and policy stay the same, so nothing that uses the key needs to change, and KMS keeps the old material to decrypt data encrypted earlier. On-demand rotation rotates immediately, for example after a suspected compromise, for keys with AWS-generated or imported material.
Manual rotation is used for key types that cannot rotate automatically, such as asymmetric keys. You create a new key and move the alias that applications use to point to it. Because the new key is a different key, the old one must be kept to decrypt existing ciphertext. The following table summarises the options.
| Method | How it works |
|---|---|
| Automatic | Symmetric customer managed keys with AWS-generated material; new material every 90 to 2,560 days (default 365). Key ID, ARN and policy unchanged; old material kept to decrypt existing data |
| On demand | Rotate immediately, for example after a suspected compromise; available for keys with AWS-generated or imported material |
| Manual | Create a new key and move an alias; for key types that cannot rotate automatically. Old ciphertext still needs the old key |
90–2,560days
Range of the automatic rotation period
365days
Default automatic rotation period
Rotation periods
What rotation does and does not do
Rotation is often misunderstood. The following list describes its effects.
- New encryptions use the new material; existing ciphertext is not re-encrypted.
- Decryption still works for data encrypted with older material, which KMS keeps.
- AWS managed keys rotate automatically every year; asymmetric and HMAC keys, and keys in custom key stores, do not rotate automatically.
- Applications that reference an alias need no change when the alias is moved to a new key.
The following diagram shows key material changing under one key ID as a KMS key is rotated automatically.

What rotation changes
Auditing rotation
GetKeyRotationStatus and ListKeyRotations show whether rotation is enabled and when it happened, and the Config rule cmk-backing-key-rotation-enabled reports customer managed keys without automatic rotation.
Meeting a 180-day rotation requirement
A compliance standard requires key material to change at least every 180 days. Automatic rotation is enabled with that period on every customer managed key:
aws kms enable-key-rotation --key-id 1234abcd-12ab-34cd-56ef-1234567890ab --rotation-period-in-days 180
aws kms get-key-rotation-status --key-id 1234abcd-12ab-34cd-56ef-1234567890ab
aws kms list-key-rotations --key-id 1234abcd-12ab-34cd-56ef-1234567890abApplications keep using the same key ID, and older ciphertext still decrypts. After a suspected compromise, rotate-key-on-demand creates new material immediately. The Config rule cmk-backing-key-rotation-enabled reports any key where rotation is off, providing evidence for the auditor.
When should a key be rotated on demand?
Show answer
After a suspected compromise, without waiting for the automatic schedule.
Exam Tips
Remember for the exam
- To rotate without changing the key ID or re-encrypting data, use automatic rotation.
- The rotation period can be set from 90 to 2,560 days.
- Rotate on demand after a suspected compromise.
- Keys that cannot rotate automatically are rotated manually by moving an alias to a new key.
- Rotation does not re-encrypt existing data.