Learning center

Diagnose a cross-account S3 object read that returns AccessDenied

For an ordinary cross-account role accessing an S3 object, check for an applicable allow on the caller's side and the resource side. Compare both policies against the same concrete object ARN.

In a fictional example, account 111122223333 authorizes role/FinanceRead to get arn:aws:s3:::reports-example-444455556666/monthly/june.csv. The bucket owner in 444455556666 granted that role a read on daily/*. Assume the bucket uses Bucket owner enforced Object Ownership and the object is in scope for an approved monthly report. With an authorized read of the bucket policy and the caller policy, you can establish the prefix mismatch without fetching the object. Cross-account evaluation ยท S3 Object Ownership

Send the bucket owner the required object scope and caller ARN. For SSE-KMS objects, also check the KMS authorization path when evidence points to decrypt. A bucket-policy change cannot grant use of the KMS key.

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