Skip to content
Cloud Governance Tools

Deny KMS key deletion

Deny KMS key deletion is an AWS guardrail written in service control policies. Denies scheduling KMS key deletion and deleting aliases, custom key stores and imported key material unless the caller is the privileged role. What it breaks: routine key cleanup, including alias deletion, needs the privileged role in every affected account.

More encryption and keys guardrails ยท About Service control policies

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Deny",
      "Action": [
        "kms:ScheduleKeyDeletion",
        "kms:DeleteAlias",
        "kms:DeleteCustomKeyStore",
        "kms:DeleteImportedKeyMaterial"
      ],
      "Resource": "*",
      "Condition": {
        "ArnNotLike": {
          "aws:PrincipalArn": "arn:aws:iam::${Account}:role/[PRIVILEGED_ROLE]"
        }
      }
    }
  ]
}
Blocks
Denies scheduling KMS key deletion and deleting aliases, custom key stores and imported key material unless the caller is the privileged role.
Breaks
Routine key cleanup, including alias deletion, needs the privileged role in every affected account. (source)
Test before applying
As for every Service control policies guardrail: how to test before enforcing
Mechanism
Service control policies (SCPs): IAM users, IAM roles and the root user in member accounts; not the management account and not service-linked roles.
Taken from
open source set, MIT-0 (README states MIT-0; LICENSE file fetched, MIT-0 text, Copyright Amazon.com, Inc.): https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/LICENSE

What the policy text names

It names 4 actions or patterns: kms:ScheduleKeyDeletion, kms:DeleteAlias, kms:DeleteCustomKeyStore, kms:DeleteImportedKeyMaterial. Its conditions test aws:PrincipalArn.

What the source says

kms:ScheduleKeyDeletion (read 10 Nov 2026).

On what it breaks: "Deny the accidental or intentional deletion of a KMS key and only allow specific roles to delete KMS keys."

Sources

  1. Deny KMS key deletion, read 10 Nov 2026
  2. What it breaks, read 10 Nov 2026
  3. How to test it first, read 10 Nov 2026

Last reviewed 16 Nov 2026.