Founding prices until 15 December: 30% off Pro, locked for life. See pricing

$ … AccessDenied: User is not authorized to perform: s3:GetObject

AWS 'is not authorized to perform': fixing AccessDenied

No policy allows the call, or one explicitly denies it.

Cloud

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.

Open the lab

No account needed for your first tries.

Related errors