Search code examples
amazon-web-servicespostmanaws-api-gatewayamazon-iam

Getting User not authorized to perform: execute-api:Invoke on resource: arn:aws:execute-api:eu-west-1:********0900:


I am trying to access AWS lending API using postman, but I am getting following error:

enter image description here

My postman setup is below:

enter image description here

And my IAM user setup is below:

enter image description here

enter image description here


Solution

  • Your current setup only allows the role AmazonLendingAPIRole to access the API. You are accessing the API using the user AmazonLendingUser which only has access to assume the role. What you need to do is attach the policy allowing the execute-api permissions directly to your user to allow the access through.

    More information can be found in the following documentation.