By using AWS re:Post, you agree to the AWS re:Post Terms of Use

How to solve: "Access denied when calling InvokeModel. Check your request permissions and retry the request."

0

Hi, I'm new to AWS and was going through this guide: https://docs.aws.amazon.com/bedrock/latest/userguide/flows-ex.html when I ran into this error. I am trying to use Claude 3 Sonnet for my model of choice but for some reason despite having access to the model, it says access denied. The IAM user I'm using also has full access to AWS Bedrock so that shouldn't be the issue.

1 Answer
2

Hello.

Please check not only the IAM policy used by the IAM user but also the IAM policy of the IAM role used by the prompt flow.
If you also created an IAM role when creating a prompt flow from the management console, I think the appropriate IAM policy has been set, but please double check.
https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html

You can check the IAM role used by Prompt Flow from the screen below.
a

If configured correctly, the IAM policy for executing InvokeModel should be set as shown in the image below.
a

Also, just to be sure, make sure that model access is enabled for the model you want to use in the region where you created the prompt flow.
https://docs.aws.amazon.com/bedrock/latest/userguide/model-access-modify.html

profile picture
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
profile pictureAWS
EXPERT
reviewed 2 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.

Guidelines for Answering Questions

Relevant content