Cloud and platforms
AWS KMS vs Azure Key Vault Keys vs Google Cloud KMS: Rotation and Key Deletion
In short
AWS KMS, Azure Key Vault keys and Google Cloud KMS rotate alike: new key material, old material kept so old ciphertext still decrypts, data not re-encrypted. Deletion is where they split: a deleted AWS key lingers 7 to 30 days, a Key Vault key stays soft-deleted 7 to 90, and a Cloud KMS version waits 24 hours to 120 days. Afterwards, AWS and Google say the data cannot be decrypted.
What does automatic key rotation change in each service?
In all three the key keeps its name or ID, so applications keep the same key reference; the bookkeeping underneath differs.
AWS KMS keeps the same key ID and ARN and swaps only the current key material; on decrypt, KMS itself picks the material that produced the ciphertext. KMS-generated material is retained, even with rotation off, until the key is deleted.
Key Vault creates a new key version under the same name. Services follow the versionless key URI, while each piece of data keeps the versioned URI it was wrapped with.
Cloud KMS adds a key version. A symmetric key encrypts with its primary version by default, and the ciphertext records which version it used; asymmetric keys have no primary, so callers name the version.
| Setting | AWS KMS | Azure Key Vault keys | Google Cloud KMS |
|---|---|---|---|
| Automatic rotation period | 90 to 2,560 days; 365 when not set | Rotation time of at least 7 days from creation and 7 days from expiration time; no maximum stated on the pages I read | 24 hours to 876,000 hours (1 day to 100 years) |
| Rotation outside the schedule | On demand, up to 25 times per key, without moving the schedule | Rotate Now or `az keyvault key rotate` | Create a version and make it primary; the schedule is untouched |
| Billing dimension | Monthly fee for the first and second rotated material, then capped | Extra cost per scheduled rotation | Each active key version, until it is destroyed |
Checked against: source 1, source 2, source 3, source 4, source 9, source 16, source 17, source 18, source 21, source 23
Which keys cannot rotate automatically?
AWS rotates automatically only symmetric keys with KMS-generated material. Asymmetric, HMAC and custom key store keys need manual rotation: a new key plus an alias or application change. Symmetric keys with imported material can rotate on demand once the new material is imported.
Google explains its asymmetric rule: a new version is useless until its public key reaches the applications that encrypt or verify. The API accepts a rotation period only for ENCRYPT_DECRYPT keys. Imported keys start with rotation off; enabling it makes Cloud KMS generate the new versions, and import-only keys rotate by hand.
Key Vault keys are RSA, EC or, on Premium, oct-HSM, and the rotation page names no key-type limit. It does give a key imported from a local HSM as a case where automated rotation can't be used, and suggests near-expiry Event Grid notifications there, as a reminder or as a trigger for your own rotation.
Checked against: source 1, source 2, source 4, source 9, source 10, source 16, source 17, source 22, source 23
What happens to data encrypted under older key material?
None of the three re-encrypts your data when a key rotates. AWS adds that rotation leaves the data keys a KMS key produced untouched, so it does nothing for a leaked data key.
Key Vault leaves the follow-up to the services that wrap data keys: old and new versions must both stay enabled until re-wrapping finishes, and services need from one hour to more than 24 hours to notice a new version. Azure Storage checks once a day, so Microsoft says to wait 24 hours before disabling the older version.
Cloud KMS leaves earlier versions enabled, and billed, until you destroy them. Re-encrypting the data under the new version is what makes an old version safe to destroy. AWS offers no such cleanup for KMS-generated material, which simply stays inside the key.
How long can a deleted key still be recovered in AWS KMS vs Azure Key Vault vs Google Cloud KMS?
Each puts the safety window on a different object: AWS schedules a whole key, Key Vault soft-deletes a whole key with all its versions, and Cloud KMS schedules one key version at a time.
| Question | AWS KMS | Azure Key Vault keys | Google Cloud KMS |
|---|---|---|---|
| What is deleted | The whole KMS key | The key object; earlier versions cannot be deleted one by one | One key version; the key and its other versions stay |
| Window and default | 7 to 30 days, 30 by default; can end up to 24 hours later | 7 to 90 days, 90 by default | 24 hours to 120 days, 30 by default; import-only keys can go to 0 |
| Where the window is set | On each request (`PendingWindowInDays`) | At vault creation, for the whole vault | At key creation (`destroyScheduledDuration`), fixed for every later version |
| Undo during the window | Cancel deletion; the key returns disabled | Recover the soft-deleted key | Restore the version; it returns disabled |
| Ending the window early | Not possible; the waiting period is mandatory | Purge, unless purge protection is on | Not offered; a version is always scheduled first, though import-only keys may set a 0 duration |
Which settings decide how safe a mistaken delete is?
On Key Vault, soft delete comes first, since a vault without it deletes a key permanently; purge protection comes next. Purge protection is off by default, Microsoft recommends it for encryption keys, Azure Storage requires both for customer-managed keys, and once on it cannot be disabled by anyone, Microsoft included. Vault-level retention works as in the secrets comparison.
On AWS, a key pending deletion fails every cryptographic call and is not rotated, and a multi-Region primary key starts its waiting period only after its replicas are deleted. On Google, organisation policy can set a minimum destruction window and require disabling first. Deleting a Cloud KMS key or key ring removes it from listings; destroying a version is what erases material.
Checked against: source 5, source 6, source 7, source 12, source 13, source 14, source 15, source 18, source 19, source 20, source 21, source 23
What is lost when key material is truly destroyed?
AWS is blunt: after the waiting period the key, its aliases and its metadata are gone, and data encrypted under it is unrecoverable. The named exceptions are multi-Region replica keys and asymmetric or HMAC keys with imported material. A symmetric key cannot be rebuilt even from the same imported material, because each ciphertext is bound to the original key's metadata.
Asymmetric encryption keys add a silent failure on AWS. Anyone holding a downloaded public key can keep encrypting after the private key is scheduled for deletion, with no error, and unless the deletion is cancelled that ciphertext cannot be decrypted. AWS suggests checking CloudTrail for public key downloads and disabling the key instead.
Google says a destroyed version's material is no longer stored: its ciphertext cannot be recovered, it cannot sign, and an asymmetric public key is no longer downloadable. Removal from all active and backup systems takes 45 days. The only way back is re-importing identical material into a version that was imported originally.
Microsoft calls a purge permanent and recommends purge protection for encryption keys to prevent data loss; the pages I read do not spell out the ciphertext outcome as AWS and Google do. Key Vault does offer a per-key backup blob, restorable only into a vault in the same subscription and Azure geography, and lists protection against accidental deletion among its uses.
Checked against: source 5, source 11, source 12, source 14, source 18, source 19, source 22
How do you disable a key instead of deleting it?
AWS and Google recommend disabling as the reversible step before deletion; Key Vault documents it as the way to revoke access to a key.
- AWS:
aws kms disable-keyblocks cryptographic use at once, subject to eventual consistency, though resources protected through data keys are affected only when the KMS key is next called, for example to decrypt a data key. A disabled key is not rotated; if it missed a rotation, it rotates on re-enable. - Azure: set the key's
enabledattribute to false. The expiry date is no substitute, because expired and not-yet-valid keys still decrypt, unwrap and verify. Azure Storage answers reads and writes with 403 once its key is disabled. - Google: disable the key version; Google says this typically takes effect within one minute, and re-enabling is nearly instant.
- My order on any of them: disable, watch the key's logs through a full cycle of every job that uses it, then delete with the longest window allowed (on Key Vault and Cloud KMS, fixed when the vault or key was created). Google's example is a quarterly job, with the version kept disabled until that job has run.
Checked against: source 1, source 8, source 11, source 15, source 19, source 20
What else do people ask?
Does rotating a key re-encrypt existing data?
No, in none of the three. Old ciphertext stays tied to the older material or version, so that material must stay available until the data is re-encrypted or its data keys re-wrapped.
Can one old key version be removed without deleting the key?
On Cloud KMS, yes: destroy that version. Key Vault says earlier versions cannot be deleted. AWS keeps KMS-generated material until the key goes, while imported material can be deleted and imported again.
Sources
- AWS KMS Developer Guide, rotate AWS KMS keys, fetched 2026-11-21
- AWS KMS Developer Guide, enable automatic key rotation, fetched 2026-11-21
- AWS KMS API Reference, EnableKeyRotation (RotationPeriodInDays), fetched 2026-11-21
- AWS KMS Developer Guide, perform on-demand key rotation, fetched 2026-11-21
- AWS KMS Developer Guide, delete an AWS KMS key, fetched 2026-11-21
- AWS KMS API Reference, ScheduleKeyDeletion (PendingWindowInDays), fetched 2026-11-21
- AWS KMS API Reference, CancelKeyDeletion, fetched 2026-11-21
- AWS KMS Developer Guide, enable and disable keys, fetched 2026-11-21
- Microsoft Learn, configure cryptographic key auto-rotation in Azure Key Vault, fetched 2026-11-21
- Microsoft Learn, about Azure Key Vault keys, fetched 2026-11-21
- Microsoft Learn, Key Vault key types, algorithms and operations (key attributes), fetched 2026-11-21
- Microsoft Learn, Azure Key Vault soft-delete overview, fetched 2026-11-21
- Microsoft Learn, Key Vault recovery management with soft delete and purge protection, fetched 2026-11-21
- Microsoft Learn, Azure Key Vault backup, fetched 2026-11-21
- Microsoft Learn, customer-managed keys for Azure Storage encryption, fetched 2026-11-21
- Google Cloud KMS, key rotation, fetched 2026-11-21
- Google Cloud KMS, rotate a key, fetched 2026-11-21
- Google Cloud KMS, key version states, fetched 2026-11-21
- Google Cloud KMS, destroy and restore key versions, fetched 2026-11-21
- Google Cloud KMS, enable and disable key versions, fetched 2026-11-21
- Google Cloud KMS, Cloud KMS resources (primary version, resource life cycles), fetched 2026-11-21
- Google Cloud KMS, import a key version into Cloud KMS, fetched 2026-11-21
- Google Cloud KMS REST reference, projects.locations.keyRings.cryptoKeys, fetched 2026-11-21
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. This page compares AWS KMS, Azure Key Vault and Google Cloud KMS documents fetched on 21 Nov 2026: rotation, deletion and key-state pages, the API references for rotation and deletion windows, Key Vault soft delete, purge protection and backup, and the Azure Storage customer-managed key page. I did not create, rotate or delete keys for it. Secrets, certificates, Managed HSM, CloudHSM and external key managers, prices and SDKs are out of scope. Found a mistake? Tell me.