Skip to Content
Asterrr's Handbook
Service cheat sheetsSecurity and identity cheat sheets

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.

AWS KMSencrypt datasign, verify, encryptSymmetric keyAsymmetric keypairS3, EBS, RDSOutsideapplication
Pick the key spec by who needs to use the key. AWS services only use symmetric keys. Outside parties use the public half of an asymmetric key.

Key types

TypeSpecUsageNotes
Symmetric encryptionSYMMETRIC_DEFAULT, AES-256-GCMEncrypt and decryptDefault when you omit the spec. The only type AWS services use. Supports encryption context, imported key material, custom key stores and multi-Region keys.
RSARSA_2048, RSA_3072, RSA_4096Encrypt/decrypt or sign/verifyNever both on one key.
Elliptic curveNIST P-256, P-384, P-521, Ed25519, secp256k1Sign/verify, or derive shared secrets (NIST curves)secp256k1 is for cryptocurrency.
HMACHMAC_224 to HMAC_512Generate and verify MACsSymmetric.
Post-quantumML-DSA for signing, ML-KEM for key encapsulationSign/verify or encapsulateNewer 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

KeyYou manageRotation
Customer managedPolicy, lifecycle, aliasesOptional. 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 ownedNothing. Not visible in your account.Decided by the owning service.

What can rotate

KeyAutomaticOn-demandManual
Symmetric, KMS-generated materialYesYesn/a
Symmetric, imported materialNoYesYes
Asymmetric, HMAC, custom key store keysNoNoYes (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.

KMS vs CloudHSM, Secrets Manager

Further reading

On this page