Configure AWS KMS key policies, IAM policies, and grants for least-privilege key access

domain: docs.aws.amazon.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Understand the evaluation model: a KMS key policy is the primary resource-based policy; IAM identity policies can delegate permissions only if the key policy explicitly allows the account or IAM entities
  2. Write a key policy with a root principal statement (the AWS account) to prevent lock-out, then add specific statements granting kms:Encrypt, kms:Decrypt, kms:GenerateDataKey, or kms:DescribeKey to the intended principals
  3. For cross-account or service access, add the external account principal or AWS service principal to the key policy; do not rely solely on IAM policies across account boundaries
  4. Use KMS grants for temporary or delegated access (e.g., AWS services acting on behalf of a user); grants can be retired without modifying the key policy
  5. Audit effective permissions with IAM Policy Simulator and CloudTrail kms:* events; look for overly broad principals like '*'
  6. Enable key deletion protection and set a pending deletion window (consult current docs for minimum window); require MFA or an approval workflow before scheduling deletion

Known gotchas

Related routes

Configure automatic key rotation in AWS KMS and Azure Key Vault and manage the rotation lifecycle
docs.aws.amazon.com · 6 steps · unrated
Create RBAC Role and RoleBinding to grant least-privilege access within a namespace
kubernetes.io · 5 steps · unrated
Configure a Kubernetes admission webhook with cert-manager for TLS provisioning and implement a ValidatingWebhookConfiguration to enforce custom policies
kubernetes.io · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans