Cannot access bedrock models

0

I am testing the following lab

https://github.com/aws-samples/aurora-postgresql-pgvector/tree/main/02_RetrievalAugmentedGeneration/02_QuestionAnswering_Bedrock_LLMs

I got an error "ValueError: Error raised by inference endpoint: An error occurred (AccessDeniedException) when calling the InvokeModel operation: You don't have access to the model with the specified model ID." when I try streamlit run rag_app.py --server.port 8080

I am using root access also created a separate user with Bedrock full access, both failed with same error.

Please help me

Thanks.

1 Answer
1
Accepted Answer

Hello.

Please enable model access by following the steps in the document below.
Looking at the code, it seems that "us-west-2" is being used, so try enabling model access using "us-west-2".
https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html#model-access-add

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • Thank you, it worked after enabling in us-west-2

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