AWSMid

AWS "is not authorized to perform" (AccessDenied)

Read the AccessDenied message for the action, the resource and the policy type that denied it, then check identity policies, resource policies and conditions.

What you see

  • User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: widgets:GetWidget on resource: my-example-widget

What it means

Most messages follow one pattern: User USER is not authorized to perform ACTION on RESOURCE because CONTEXT. The context tells you which kind of policy said no. An explicit denial means a Deny statement matched. An implicit denial means nothing allowed the action, and because access is denied by default, that is a denial too.

Several policies can apply to one request. Review all of them, not only the one named in the message.

How to confirm the cause

  1. 1
    Read the full error text
    # Copy the whole message. Note the action, the resource ARN and the phrase after "because" or "with an explicit deny in".

    If the message names a policy type and ARN, start with that policy.

  2. 2
    Check who you are
    aws sts get-caller-identity

    Confirms the principal and account the request was made as.

Causes and fixes

  • No identity policy allows the action

    HOW TO TELL
    The message says because no identity-based policy allows the ... action.
    FIX
    Add an Allow statement for that action and resource to a policy attached to the user or role.
  • Resource-based policy missing or wrong

    HOW TO TELL
    The service supports resource policies (S3, SNS, SQS) and you are calling across accounts.
    FIX
    Across accounts, both your identity policy and the resource policy must allow the request. Check the resource policy names you as a principal.
  • A condition is not met

    HOW TO TELL
    The policy has a Condition and your request does not satisfy it.
    FIX
    Read each condition key carefully. Condition key names are not case sensitive, so keys that differ only by case can clash.
  • Expired or limited temporary credentials

    HOW TO TELL
    You use a role session or federated credentials.
    FIX
    Check the credentials have not expired, and whether a session policy limits them. The effective permission is the intersection of the role's policies and the session policy.

How to stop it coming back

  • Grant least privilege, and test new policies with the IAM policy tools before rollout.
  • Keep error messages in your logs so the context phrase is not lost.

Keep going

Sources

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

Search

Search cheat sheets and projects