Rotating KMS Keys Without Breaking Access to Data
This lesson explains how rotation replaces a key's cryptographic material on a schedule, limiting how much data any one version protects, without breaking access to existing data.
Learning outcomes
After completing this lesson, you will be able to:
- Identify the rotation options for each key type.
- Explain how automatic rotation keeps existing data readable.
- Explain how keys are rotated manually through an alias.
Rotation options
Key rotation replaces the cryptographic material behind a key, and how it works depends on the type of key. For a customer managed symmetric key, automatic rotation can be enabled, every 365 days by default or any period from 90 to 2,560 days, and the key can also be rotated immediately on demand. The key keeps the same ID and ARN, older material is retained so existing data still decrypts, and nothing needs to be re-encrypted. AWS managed keys rotate automatically every year, and this cannot be changed.
Symmetric keys with imported key material cannot rotate automatically, but since June 2025 they can be rotated on demand: new key material is imported into the same key and RotateKeyOnDemand makes it current, keeping the key ID and the older material, up to 25 times per key. Asymmetric and HMAC keys, and keys in custom key stores, cannot rotate at all; they are rotated manually by creating a new key and pointing the application's alias at it, keeping the old key for decrypting existing data. The following table summarises the options.
| Key | Rotation |
|---|---|
| Customer managed symmetric | Automatic every 365 days by default (90 to 2,560 configurable), and on demand |
| AWS managed | Automatic every year; cannot be changed |
| Symmetric, with imported material | On demand after importing new material (up to 25 times); no automatic rotation |
| Asymmetric, HMAC, custom key stores | Manual: create a new key and update the alias |
How does this key rotate?
How automatic rotation works
Automatic rotation replaces a key's cryptographic material on a schedule without affecting applications or existing data. The key ID, ARN, aliases and key policy all stay the same, so applications need no changes.
KMS keeps every previous version of the key material for as long as the key exists, so data encrypted before a rotation still decrypts and nothing needs to be re-encrypted. New encryptions automatically use the latest material. Customer managed keys can rotate automatically on a period the customer chooses, and on demand, while AWS managed keys rotate every year.
The following diagram shows a key after two rotations.

Manual rotation
Keys that support no rotation at all, such as asymmetric keys, HMAC keys and keys in custom key stores, are rotated manually by replacing the whole key. The procedure relies on aliases.
-
Create a new key
Create a new KMS key.
-
Move the alias
Point the alias that applications use at the new key, so new encryptions use it.
-
Handle the old key
Keep the old key enabled so that existing data still decrypts, or re-encrypt the existing data with the new key and then disable and eventually delete the old one.
Applications that refer to keys by alias switch to the new key without code changes, which is a reason always to reference keys by alias.
Rotating a key manually
Meeting an annual rotation policy
An annual key rotation requirement is met differently depending on the type of key. The following table describes the rotation approach for each key.
| Key | Rotation approach |
|---|---|
| Customer managed symmetric key for S3 and RDS | Enable automatic rotation every 365 days; no application changes |
| Key with imported material required by the regulator | Each year, import new key material into the same key and rotate it on demand |
| Asymmetric signing key | Create a new key, publish its public key, move the alias, keep the old public key for verifying old signatures |
Automatic rotation keeps old key material, so nothing is re-encrypted. For manual rotation, the old key stays enabled until no data depends on it.
After automatic rotation, how is data encrypted with the old key material decrypted?
Show answer
Automatically. KMS keeps all earlier key material for the key and selects the right one, and the key ID does not change.
Exam Tips
Remember for the exam
- Automatic rotation needs no application changes, because the key ID stays the same.
- Rotation does not require re-encrypting existing data.
- Keys with imported material rotate on demand after new material is imported; asymmetric and HMAC keys are rotated by creating a new key and moving the alias.
- A rotation period shorter than a year requires a customer managed key.