Learning center

Check whether an AWS KMS key policy enables the caller's IAM grant

A KMS identity-policy allow works only when the key authorization also supports that access. In the same account, a key policy can grant a principal directly or enable the account to delegate through IAM. KMS grants can also authorize specified operations.

Suppose a fictional role's IAM policy allows kms:DescribeKey on a customer managed key. The key's policy grants access only to a key administrator and has no delegation statement for IAM. A key administrator with read access can retrieve the default policy for the named key.

aws kms get-key-policy \
  --key-id arn:aws:kms:eu-west-1:111122223333:key/12345678-1234-1234-1234-123456789012 \
  --policy-name default

Check relevant grants and other applicable restrictions before concluding that absent delegation caused the denial. If the role only needs key metadata, ask the key owner to evaluate that narrow action. Adding cryptographic permissions to the role would expand the request beyond what the incident requires. AWS KMS key policies · Default key policy · KMS grants

Trace another denied request.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading