A new engineer runs `sops -d` on a KMS-encrypted file and gets `AccessDeniedException: ... is not authorized to perform: kms:Decrypt`
BeginnerTroubleshootingSecrets management: Vault, External Secrets and SOPS
Answer
Likely causes → Their IAM role or SSO permission set has no kms:Decrypt on that key, the key policy does not delegate to IAM, or they are logged into the wrong account or profile.
Diagnose →
aws sts get-caller-identity
yq '.sops.kms[].arn' secrets.enc.yaml
aws kms get-key-policy --key-id <arn> --policy-name default
Fix → Grant kms:Decrypt (and kms:Encrypt/kms:GenerateDataKey for editors) to the team role. Or set AWS_PROFILE to the profile mapped to the right account.
Prevent → Grant KMS access to groups or roles, never to individual users, and keep a separate key per environment so dev engineers cannot decrypt prod.
More on Secrets management: Vault, External Secrets and SOPS
`vault kv get secret/app/db` returns `Code: 403. Errors: * permission denied` although the policy allows `secret/app/*`BeginnerVault pod restarted and `vault status` shows `Sealed: true`; every app now fails to fetch secretsBeginnerPod stuck in `Init:0/1`; the `vault-agent-init` container logs `error authenticating: ... Code: 403 ... * permission denied`IntermediateAfter a cluster upgrade, Vault Kubernetes auth fails for every pod with `error validating token: invalid issuer (iss) claim`AdvancedPods annotated with `vault.hashicorp.com/agent-inject: true` start without a Vault sidecar, and the app fails on a missing fileBeginnerExternalSecret shows `SecretSyncedError` with `AccessDeniedException: ... is not authorized to perform: secretsmanager:GetSecretValue`Intermediate