내용으로 건너뛰기

Lex was unable to invoke the Bedrock foundation model on your behalf. Check that your role has permissions to allow Lex to invoke the appropriate Bedrock model and try your request again.

0

Hello, I am a beginner in AWS and want to interact with bedrock's knowledge base to Amazon Lex. I clicked "Use built-in intent">AMAZON.QnAIntent>Knowledge base for Amazon bedrock>copied Amazon Bedrock Id>Save Intent>Build>Test

Then it shown "Invalid Bot Configuration: Lex was unable to invoke the Bedrock foundation model on your behalf. Check that your role has permissions to allow Lex to invoke the appropriate Bedrock model and try your request again." with red colour Enter image description here

I have checked the role that I created Amazon Lex Bot, there is not "Add" button to add Amazon Bedrock policies... Enter image description here

so are there any solution? Really thank you very much..

3개 답변
0

Is the knowledgeBase present in the same region as the Lex Bot? Lex does not allow cross region resource calls. Make sure to have the Bedrock Knowledge Base in the same region as the Lex bot.

AWS

답변함 2년 전

0

Hi,

The message indicates a permission error in the execution role of Lex not properly defined to get access to Bedtock.

So, did you define an execution role for Lex ? (linked to the IAM policy statements that you show above)

Have a read at this post which does something very similar: https://aws.plainenglish.io/unleashing-the-power-of-conversational-ai-a-seamless-guide-to-creating-an-amazon-lex-chatbot-with-68f2e854377c

Best,

Didier

전문가

답변함 2년 전

  • Excuse me, how to "define an execution role for Lex"? I thought that the corresponding role had already been created when the bot was created, and the Gen AI Intent when creating was already "define an execution role for Lex"

0

This is months late, but I encountered the same issue and struggled for a bit, and wanted to leave an answer for those coming later.

When you select the AI model for the intent, the dropdown of models is of models that work with Lex, not necessarily ones that you have requested/gotten access to in Bedrock. In my case I already had requested access in Bedrock to Claude 3.5 Haiku as well as several other versions of Claude. In Lex, I selected to use Claude 3.5 Sonnet, thinking I already had access to it.

I checked the Lex roles in IAM and found that it wasn't possible to modify them, so was confused, until I realized the confusion in model names. As soon as I went to Bedrock and requested access to the correct model, the error message went away.

AWS

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠