What it means
AWS evaluates every policy that applies: the identity's policies, the resource's policy, boundaries and organisation policies. The call is allowed only if something allows it and nothing denies it. The error names the principal, the action and often the resource.
Causes and fixes
Most likely first. Run the check, and if it matches, apply the fix.
1. The identity policy doesn't include that action or resource ARN
Check:
aws sts get-caller-identity
aws iam list-attached-user-policies --user-name <user>
Fix: Add the exact action on the exact ARN (bucket ARN for ListBucket, bucket/* for GetObject).
2. An explicit Deny somewhere (a policy statement, a permissions boundary, an SCP)
Check:
aws iam get-policy-version --policy-arn <arn> --version-id <v>
Fix: Find and narrow the Deny; an Allow can never override it.
3. A resource policy or KMS key policy doesn't allow the principal
Check:
aws s3api get-bucket-policy --bucket <b>; aws kms get-key-policy --key-id <k> --policy-name default
Fix: Grant the principal in the resource or key policy too.
Fix it yourself
A live machine in your browser with this problem already on it. The grader checks the result.
- AccessDenied on One Calleasy 8 min
- Admin Who Can't Read the Reportsmedium 12 min
- Cut a CI User Down to One Prefixmedium 12 min
No account needed for your first tries.
Related errors
- AccessDenied: User is not authorized to perform: sts:AssumeRole
The role's trust policy doesn't name the caller, or the caller may not call sts:AssumeRole.