KMS key types and rotation
Symmetric, asymmetric and HMAC KMS keys, ownership models, and which keys can rotate.
A KMS key is the logical root key. Its key spec and key usage are fixed at creation. Private key material never leaves KMS unencrypted.
Key types
| Type | Spec | Usage | Notes |
|---|---|---|---|
| Symmetric encryption | SYMMETRIC_DEFAULT, AES-256-GCM | Encrypt and decrypt | Default when you omit the spec. The only type AWS services use. Supports encryption context, imported key material, custom key stores and multi-Region keys. |
| RSA | RSA_2048, RSA_3072, RSA_4096 | Encrypt/decrypt or sign/verify | Never both on one key. |
| Elliptic curve | NIST P-256, P-384, P-521, Ed25519, secp256k1 | Sign/verify, or derive shared secrets (NIST curves) | secp256k1 is for cryptocurrency. |
| HMAC | HMAC_224 to HMAC_512 | Generate and verify MACs | Symmetric. |
| Post-quantum | ML-DSA for signing, ML-KEM for key encapsulation | Sign/verify or encapsulate | Newer key specs. |
Use asymmetric keys when the other party cannot call KMS, for example external signature verification. A symmetric key encrypts up to 4,096 bytes directly. RSA limits depend on key size and algorithm, for example 190 bytes for RSA_2048 with SHA-256.
Ownership and rotation
| Key | You manage | Rotation |
|---|---|---|
| Customer managed | Policy, lifecycle, aliases | Optional. Default period 365 days, custom period allowed. On-demand rotation also available. |
AWS managed (aws/service) | Nothing. You can view it. | Automatic every year. Cannot be changed. |
| AWS owned | Nothing. Not visible in your account. | Decided by the owning service. |
What can rotate
| Key | Automatic | On-demand | Manual |
|---|---|---|---|
| Symmetric, KMS-generated material | Yes | Yes | n/a |
| Symmetric, imported material | No | Yes | Yes |
| Asymmetric, HMAC, custom key store keys | No | No | Yes (new key plus alias change) |
Rotation changes only the current key material. The key ID, ARN and aliases stay the same. Old material is kept to decrypt old ciphertext. Rotation does not re-encrypt existing data or rotate data keys. KMS charges extra for the first and second rotation only.
Legacy
AWS managed keys rotated every three years until May 2022. They now rotate every year. Older books may omit that change.
Exam signal
"Rotate yearly with no code change" is automatic rotation on a symmetric customer managed key. "Keys must rotate but the key is asymmetric" means create a new key and repoint the alias.
Exam trap
Enabling rotation does not protect a data key that was already exposed, because existing data keys and ciphertext are untouched.
Related
KMS vs CloudHSM, Secrets Manager