How long is this model access approval process supposed to take? I submitted my use case for the Claude models 2 weeks ago. I'm trying to use Amazon Bedrock, so Knowledge Base + RAG + Foundation Model. I'd happily test with another FM, but ONLY the Anthropic Claude models can be used as the FM at the moment. And to do that you need the model access approved. Dead in the water, please help! :) Thank you
replied 2 years ago
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
You must save changes to enable model access for Anthropic. If you are unable to gain access by saving changes even after the "Submit use case details" is grayed out, please raise a ticket with AWS Support.
replied 2 years ago
If you encounter a "ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: "claude-3-sonnet-20240229" is not supported on this API. Please use the Messages API instead.", please see the following sample code:
import boto3
import json
bedrock = boto3.client(service_name='bedrock-runtime')
body = json.dumps({
"anthropic_version": "bedrock-2023-05-31",
"max_tokens": 300,
"temperature": 0.1,
"top_p": 0.9,
"messages": [
{
"role": "user",
"content": "explain black holes to 8th graders"
}
]
})
modelId = 'anthropic.claude-3-sonnet-20240229-v1:0'
accept = 'application/json'
contentType = 'application/json'
response = bedrock.invoke_model(body=body, modelId=modelId, accept=accept, contentType=contentType)
response_body = json.loads(response.get('body').read())
print(response_body['content'][0]['text'])
Your account is not authorized to perform this action. Please create a support case (https://console.aws.amazon.com/support/home) with details about your use case and we will get back to you.
I have this error when I try to Submit use case details. Can you help me ?
replied 4 months ago
Thank you for sharing !!.
replied 7 days ago
Relevant content
asked a year ago
- AWS OFFICIALUpdated a year ago
