with an explicit deny in a [type] policy
- Meaning
- A Deny statement matched; the message includes the policy ARN
- Fix
- Change the Deny so the user gets the access needed
Decode an Amazon S3 Access Denied 403: explicit vs implicit deny, the policy type in the message, Block Public Access, KMS, Requester Pays and CloudFront.
S3 returns Access Denied (HTTP 403 Forbidden) when AWS explicitly or implicitly denies the request. An explicit denial is a Deny statement; an implicit denial is the absence of any Allow. For same-account and same-organization requests, the error message names the policy type that denied it. Read that message first, then fix that policy.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
Because an IAM policy implicitly denies an IAM principal by default, the policy must explicitly allow the action. So the fix for an implicit denial is adding an Allow, and the fix for an explicit denial is changing or removing a Deny. For the general status, see 403 Forbidden.
User: user-arn is not authorized to perform: action on "resource-arn" because contextaws s3 cp s3://amzn-s3-demo-bucket/object.txt /local/path \
--request-payer requesterThe Block Public Access rules explain a common surprise. Setting a public bucket policy or ACL doesn't help if a Block Public Access setting prevents it. IgnorePublicAcls causes an implicit denial; RestrictPublicBuckets causes an explicit one and also rejects all anonymous (unsigned) calls.
If the 403 appears through CloudFront, AWS says to check two things: that you use the S3 website endpoint format (bucket-name.s3-website-region.amazonaws.com) rather than the REST API endpoint, and that the bucket policy allows your distribution's OAI or OAC with s3:GetObject. The CloudFront side, including geo restrictions and WAF, is in 403 on CloudFront.
Images, PDFs and scripts served from S3 that return 403 to Googlebot are treated like any 4xx other than 429: Google treats the content as nonexistent. Google ignores any content it receives from a URL that returns a 4xx status code. See 4xx errors and Google's page on how HTTP status codes affect its crawlers.
4 questions people ask next, answered from the sources on this page.
AWS explicitly or implicitly denied the request. An explicit denial is a Deny statement for the action; an implicit denial is the absence of any applicable Allow. The error message names the policy type for same-account and same-organization requests.
Block Public Access settings override bucket policies, ACLs and permissions. Other possible causes are an SCP, a VPC endpoint policy, a permissions boundary, KMS key permissions, Requester Pays settings or Object Lock.
Enhanced access denied messages are returned only for same-account requests or requests in the same AWS organization. Cross-account requests outside the organization, and requests to directory buckets, return a generic Access Denied.
Include the --request-payer requester parameter in the AWS CLI, or set the x-amz-request-payer header to requester in SDK requests. The caller also needs permissions such as s3:GetObject and s3:ListBucket.
Run the free audit, then approve the fixes. Every change can be undone.