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 Risposta
1
Risposta accettata

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
ESPERTO
con risposta 2 mesi fa
profile picture
ESPERTO
verificato 2 mesi fa
  • Thank you, it worked after enabling in us-west-2

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande