# Least privilege for AWS KMS means separate key administrators and key users, with encryption context conditions

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

AWS KMS keys are governed by a key policy, and IAM policies work only if the key policy allows them. AWS documentation read on 16 Nov 2026 recommends separate administrator and user statements and encryption context conditions. This guide gives the key user action list and the checks.

## A key policy is required and IAM policies work only if it allows them

AWS documentation says the default key policy contains an "Enable IAM User Permissions" statement for the account root principal. Without it, IAM policies that allow access to the key are ineffective, though IAM policies that deny access still work.

The console also adds a key administrators statement and a key users statement. AWS says to give permissions in key policies where possible, rather than IAM policies that can apply to many keys, especially for kms:PutKeyPolicy and kms:ScheduleKeyDeletion.

The identities that call this service (people, services, workloads, third parties) are covered in the [AWS service identities guide](/guides/aws-service-identities/) and the [workload identities guide](/guides/aws-workload-identities/).

## kms:* in both the key policy and an IAM policy gives full control

- kms:* in the key policy and in an IAM policy. AWS says the principal then holds both administrative and usage permissions; delegate this only to named principals.
- The default administrators list, which uses wildcards such as kms:Create*, kms:Put* and kms:Delete*. AWS says new API operations are then allowed automatically, and you can change the policy to a fixed set.
- kms:TagResource and kms:UntagResource for administrators. AWS says tags can control access to the key, so these permissions can allow or deny access.
- Unrestricted kms:CreateKey. AWS says creators set the key policy, so limit it, for example with the kms:KeySpec condition.

## A key user statement lists five actions

AWS shows the statement the console adds for a symmetric encryption KMS key, naming a role as the principal. Users get the cryptographic operations but not the administrative ones. In the administrators statement, kms:CreateKey is not listed because AWS says it is valid only in an IAM policy, and kms:Delete* does not allow ScheduleKeyDeletion, which is its own entry.

| Sid | Principal | Actions | Resource |
| --- | --- | --- | --- |
| Allow use of the key | arn:aws:iam::111122223333:role/ExampleKeyUserRole | kms:Decrypt, kms:DescribeKey, kms:Encrypt, kms:GenerateDataKey*, kms:ReEncrypt* | * |

## Encryption context and source conditions tie a grant to one resource

AWS calls encryption context condition keys the most effective way to apply least privilege to cryptographic operations, because they bind a permission to the context attached to the ciphertext. Use kms:EncryptionContext:context-key or kms:EncryptionContextKeys only with CreateGrant or symmetric operations such as GenerateDataKey and Decrypt; AWS says they cause a deny if used for DescribeKey.

For an AWS service principal, AWS strongly recommends aws:SourceArn or aws:SourceAccount. The Amazon Location example combines kms:ViaService, kms:CallerAccount and an encryption context for one tracker, so the permission to create grants applies only to that tracker. AWS says the encryption context for Secrets Manager identifies the secret and its version.

## Test in non-production and watch policy changes

AWS recommends IAM Access Analyzer when testing an application outside production to apply least privilege to IAM policies. It also says to limit who can create and attach IAM policies and to monitor for policy changes if you manage key access through IAM.

For IAM users, AWS strongly recommends MFA, including before privileged actions such as scheduling key deletion.

## Related pages

- [Least privilege for AWS Secrets Manager](/services/aws-secrets-manager/)
- [Least privilege for Azure Storage](/services/azure-storage/)
- [Least privilege for Azure Key Vault](/services/azure-key-vault/)
- [All of them](/services/)

## Sources

- Least-privilege permissions for KMS: https://docs.aws.amazon.com/kms/latest/developerguide/least-privilege.html (read 16 Nov 2026)
- Default key policy: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html (read 16 Nov 2026)
- Best practices for IAM policies in KMS: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies-best-practices.html (read 16 Nov 2026)
- KMS condition keys: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://leastprivilegeprinciple.com/services/aws-kms/
