Skip to content

IAM Authorization Failure

1

Hi, I'm getting the following error when trying to call a custom API operation: Enter image description here

  1. What could be the possible cause of this error?
  2. Possible recommendation to fix this?

Thank you!

1 Answer
-3
Accepted Answer

The error indicates an IAM permissions issue - the user 'mateojackson' lacks the required IAM permissions to perform the 'widget:GetWidget' action on 'my-example-widget' resource.

Solution:

  1. Attach appropriate IAM policy to the user/role that includes:

    • Action: "widget:GetWidget"
    • Resource: ARN of "my-example-widget"
  2. Verify the policy using IAM Policy Simulator to test permissions

Example Policy:

{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Action": "widget:GetWidget",
        "Resource": "arn:aws:widget:region:account:my-example-widget"
    }]
}

Source: AWS Documentation - IAM Troubleshooting

AWS
EXPERT
answered 5 months ago
AWS
EXPERT
reviewed 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.