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
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.
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'])
Relevant content
- asked 6 months ago
- asked 7 months ago
- AWS OFFICIALUpdated 7 months ago

