- Newest
- Most votes
- Most comments
There's no technical way to work around the principle that the customer ultimately owns their data and resources. Even the vault lock feature of AWS Backup can be worked around by closing the AWS account, leading to all data and keys being deleted after the 90-day suspension period, if the account isn't reopened before then. It would be hard to think of a practical way this could be completely prevented in any environment, because the resources would still incur costs, and a customer can always become unable to continue to pay their bills or become legally compromised.
KMS key policies of customer-managed keys can always be reset by an authorised user by opening a ticket with AWS Support. This is the failsafe mechanism for accidental or malicious revocation of permissions from legitimate users, which a paying customer always has to be able to reverse. The ability of support to reset the key policy is mentioned in this documentation section: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key, although they might have some procedures against malicious key policy modifications.
The best you could do with AWS-generated KMS keys (as opposed to keys that KMS accesses in an external key store) would be to use an AWS-managed key. It has limited abilities, not being possible to use across account boundaries, for example, but an AWS-managed key cannot be deleted except by closing the AWS account. That ultimately suffices for defeating every protection mechanism, including AWS Backup's vault lock and S3's object lock.
The other option is to use an SCP, as Shajam suggested. Properly written SCPs cannot be defeated from inside the account, but they can only be modified or lifted by the management account of an AWS Organization. The management account can always close member accounts, lift SCP restrictions, and remove member accounts from the organisation, so access rights to the management account must always be limited to completely trusted personnel.
Note that if you go with an SCP, it won't suffice to restrict KMS actions. You'll additionally need to deny at least organizations:LeaveOrganization (which will immediately lift SCP restrictions), account:CloseAccount (starts the 90-day suspension period leading to all resources being destroyed), account:StartPrimaryEmailUpdate (change root email), account:PutContactInformation, account:PutAlternateContact (changing alternate account contacts). You should also either block or strictly monitor support:CreateCase (can be used to request a KMS key policy reset) and kms:PutKeyPolicy (which can be blocked by the key policy, though, as long as the key policy isn't reset). Depending on the contents of the key policy, you would also have to protect the IAM roles, IAM users, and potential identity providers through which you permit yourself and perhaps others to manage the key.
You need SCP (service control policy for the AWS Organisation) to stop deleting the keys.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyDeleteKMSKeys",
"Effect": "Deny",
"Action": [
"kms:ScheduleKeyDeletion",
"kms:CancelKeyDeletion",
"kms:DisableKey",
"kms:DisableKeyRotation",
"kms:ScheduleKeyDeletion",
"kms:DeleteAlias"
],
"Resource": "*"
}
]
}
However, note that, someone with the right permissions can modify your SCP.
Thanks @SHAJAM! 🙂 I did come across SCPs, but as you mentioned, those can still be modified by users, so they don't provide the same level of security as Vault Lock.
Not asking for an audit, but can you think of ways a CMK with the key policy I pasted in my question could be deleted or otherwise rendered unusable?
KMS does not currently have a compliance lock equivalent to AWS Backup Vault Lock. Every customer managed key can ultimately be scheduled for deletion by an identity that holds kms:ScheduleKeyDeletion on the key, and AWS does not provide an immutable or compliance‑mode flag to prevent that. The maximum waiting period you can enforce is 30 days, which is designed to give administrators time to cancel an unintended deletion, not to meet WORM‑style retention requirements.
—Taz
answered 10 months ago
Thanks @Taz for confirming KMS does not currently have such a feature. Not asking for an audit, but can you think of ways a CMK with the key policy I pasted in my question could be deleted or otherwise rendered unusable?
Relevant content
asked 2 years ago
asked 2 years ago
asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago

Thanks a lot for the detailed answer. I'm aware that deleting the account triggers a 90-day period after which even backups protected by Vault Lock are deleted. With that said, such a deletion is very unlikely to go unnoticed for 90 days in our case. The same goes for changing the primary email address.
I also saw the text you linked to in the documentation about AWS support being able to reset a KMS key policy, though I think the primary email is notified when a support request is made. I unfortunately cannot use AWS-managed keys, as I need to backup EBS volumes and RDS instances across accounts.
Thanks for the suggestions on actions to block using SCPs; I had blocked some of those, but you listed a few others which I think are worth denying too.