Bedrock Base Models Error: You don't have access to the model with the specified model ID

0

Hello, I am trying a tutorial with a Lambda function which employs Bedrock base models and getting the following error: [ERROR] ValueError: Error raised by bedrock service: An error occurred (AccessDeniedException) when calling the InvokeModel operation: You don't have access to the model with the specified model ID. Having read the responses from others facing the same issue, I have allowed access to third-party model subscriptions for my user according to https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html#add-model-access However the error persists. What else can I try? Thank you.

Stratos
질문됨 한 달 전1108회 조회
3개 답변
0
수락된 답변

Hello.

Is the model enabled in the correct region?
This error can occur when running in a region that does not have model access enabled.
Try creating a client while specifying the region where the model is enabled as shown below.

bedrock_runtime = boto3.client(service_name='bedrock-runtime', region_name='us-east-1')
profile picture
전문가
답변함 한 달 전
  • In what region did you enable the model? Also, what region are you running Lambda in? Could you also share the code you are running?

  • The problem was that the lambda function was not using the basic model my account had access to. I corrected the code and it works as expected now. Thank you because you made me check the lambda function code.

0

The model is enabled in the correct region, I have checked it.

Stratos
답변함 한 달 전
0

Are you specifying correctly (maybe typo?) the model id? https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html

profile picture
전문가
답변함 한 달 전

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

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

질문 답변하기에 대한 가이드라인

관련 콘텐츠