# Deny KMS key deletion

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

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.

```json
{
  "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](https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Protect-cloud-platform-resource/README.md))
- **Test before applying:** As for every Service control policies guardrail: [how to test before enforcing](/mechanisms/scp/)
- **Mechanism:** [Service control policies (SCPs)](/mechanisms/scp/): 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](https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Protect-cloud-platform-resource/Deny-KMS-key-deletion.json), 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."

## Related guardrails

- [Storage accounts should have the specified minimum TLS version](/guardrails/azure-policy-storage-min-tls/): Azure, Azure Policy (built-in definitions), encryption and keys
- [Key vaults should have deletion protection enabled](/guardrails/azure-policy-keyvault-purge-protection/): Azure, Azure Policy (built-in definitions), encryption and keys
- [OS and data disks should be encrypted with a customer-managed key](/guardrails/azure-policy-disk-cmk/): Azure, Azure Policy (built-in definitions), encryption and keys
- [Enforce a 30-day KMS key deletion window](/guardrails/aws-scp-kms-30-day-deletion-window/): AWS, Service control policies (SCPs), encryption and keys
- [Deny disabling default EBS encryption](/guardrails/aws-scp-deny-disable-ebs-default-encryption/): AWS, Service control policies (SCPs), encryption and keys
- [Require server-side encryption on S3 uploads](/guardrails/aws-scp-require-s3-server-side-encryption/): AWS, Service control policies (SCPs), encryption and keys

## Related pages

- [Enforce a 30-day KMS key deletion window (AWS Service control policies)](/guardrails/aws-scp-kms-30-day-deletion-window/)
- [Deny disabling default EBS encryption (AWS Service control policies)](/guardrails/aws-scp-deny-disable-ebs-default-encryption/)
- [Require server-side encryption on S3 uploads (AWS Service control policies)](/guardrails/aws-scp-require-s3-server-side-encryption/)

## Sources

- Deny KMS key deletion: https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Protect-cloud-platform-resource/Deny-KMS-key-deletion.json (read 10 Nov 2026)
- What it breaks: https://raw.githubusercontent.com/aws-samples/service-control-policy-examples/main/Protect-cloud-platform-resource/README.md (read 10 Nov 2026)
- How to test it first: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/aws-scp-deny-kms-key-deletion/
