Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Bedrock - An error occurred (AccessDeniedException) when calling the Converse operation: You don't have access to the model with the specified model ID. #174

Open
FelipeErmeson opened this issue Jan 3, 2025 · 0 comments

Comments

@FelipeErmeson
Copy link

When correctly configuring the AWS_ACCESS_KEY, AWS_SECRET_KEY and AWS_REGION environment variables, and releasing access to the template to be used, I am getting access denied.

Error I'm getting:
An error occurred (AccessDeniedException) when calling the Converse operation: You don't have access to the model with the specified model ID.

Code:

client = ai.Client()

model="aws:anthropic.claude-3-5-sonnet-20240620-v1:0"

messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "What’s the weather like in San Francisco?"},
]

try:
    response = client.chat.completions.create(
        model=model,
        messages=messages,
    )
except Exception as ex:
    print(ex)

Library:
boto3==1.35.91

@FelipeErmeson FelipeErmeson changed the title An error occurred (AccessDeniedException) when calling the Converse operation: You don't have access to the model with the specified model ID. AWS Bedrock - An error occurred (AccessDeniedException) when calling the Converse operation: You don't have access to the model with the specified model ID. Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant