AWSMid

S3 403 Access Denied: which policy said no?

An S3 403 comes from an identity or bucket policy, Block Public Access, an SCP, a VPC endpoint policy or a boundary. Read the message to find the layer.

What you see

  • s3:GetObject with an explicit deny in a service control policy, with policy ARN: ...
  • ... because no VPC endpoint policy allows the s3:GetObject action
  • HTTP 403 Forbidden with AccessDenied

What it means

S3 returns 403 when AWS denies the request explicitly (a Deny statement matched) or implicitly (nothing allowed it). For requests inside the same account or the same AWS Organization, S3 adds context to the message: the policy type that denied the request and, for explicit denies, the ARN of that policy.

That context is the shortcut. It names the layer to fix, so read it before you open any policy. Enhanced messages are returned only for same-account or same-organization requests; a cross-organization request gets a plain error.

How to confirm the cause

  1. 1
    Read the whole error message
    # Note: the action, the resource ARN, and the words after "because" or "with an explicit deny in a ... policy".

    The policy type tells you where to look. A policy ARN, when present, tells you which policy.

  2. 2
    Confirm who is making the request
    aws sts get-caller-identity

    A common surprise: the call runs as a different role than you assumed.

  3. 3
    Check the bucket's public access settings
    aws s3api get-public-access-block --bucket BUCKET

    Relevant when the request is anonymous or cross-account.

  4. 4
    Read the bucket policy
    aws s3api get-bucket-policy --bucket BUCKET

    Look for a Deny that matches, or a missing Allow for your principal.

Causes and fixes

  • Identity or bucket policy does not allow it

    HOW TO TELL
    because no identity-based policy allows or no resource-based policy allows the action.
    ROOT CAUSE
    Access is denied by default, and nothing grants this principal the action on this resource.
    FIX
    Add an Allow for the action and the object ARN (arn:aws:s3:::BUCKET/* for objects) to the identity policy or bucket policy. For cross-account access both sides must allow it.
  • A service control policy or resource control policy denies it

    HOW TO TELL
    explicit deny in a service control policy or resource control policy, with a policy ARN.
    ROOT CAUSE
    An Organizations policy sets a limit above the account. No account-level policy can override it.
    FIX
    Change or remove the Deny in that policy, in AWS Organizations.
  • VPC endpoint policy blocks it

    HOW TO TELL
    no VPC endpoint policy allows or explicit deny in a VPC endpoint policy.
    ROOT CAUSE
    The request goes through a gateway or interface endpoint, and the endpoint's own policy does not allow the action.
    FIX
    Update the endpoint policy to allow the action and bucket.
  • Permissions boundary or session policy limits it

    HOW TO TELL
    permissions boundary or session policy in the message.
    ROOT CAUSE
    These set a maximum. The identity policy allowing it is not enough if the boundary or session policy does not.
    FIX
    Update the boundary or session policy.
  • Block Public Access or Requester Pays

    HOW TO TELL
    Anonymous or cross-account access fails even with a matching policy, or the bucket is Requester Pays.
    ROOT CAUSE
    IgnorePublicAcls and RestrictPublicBuckets can nullify public grants, and Requester Pays buckets need the requester to opt in.
    FIX
    Adjust the Block Public Access setting only if public access is intended. For Requester Pays, send the requester-pays header with the request.

How to stop it coming back

  • Prefer identity policies on roles and keep bucket policies small.
  • Keep Block Public Access on at account level.
  • Log S3 access and CloudTrail data events for sensitive buckets.

Keep going

Sources

AWS documentation (docs.aws.amazon.com), read 18 Nov 2026.

Search

Search cheat sheets and projects