Anthropic Claude 3 - Sonnet - Access Denied Error

0

I was granted to use Claude 3 Sonnet on Bedrock today (shows up as "Access granted" in my Model Access Bedrock page). In my JS code which was working fine, I merely replaced my "modelID" value of "anthropic.claude-v2:1" with "anthropic.claude-3-sonnet-20240229-v1:0" - I'm getting an "AccessDeniedException: You don't have access to the model with the specified model ID." But I do have access from the Bedrock model access page. Anyone have suggestions on how to troubleshoot? Everything was working with version 2.1.

DJL
gefragt vor 3 Monaten2175 Aufrufe
4 Antworten
2
Akzeptierte Antwort

Hello.

Is the region specified in the JavaScript code correct?
I believe Claude 3 Sonnet is currently only available in us-east-1 and us-west-2.(When I checked from the management console, I was able to enable it only in us-east-1 and us-west-2.)
Also, is Claude 3 Sonnet enabled in the correct region?

profile picture
EXPERTE
beantwortet vor 3 Monaten
profile picture
EXPERTE
überprüft vor 3 Monaten
1

Hi,

You may face the same issue as me: for Claude v2.1, I was using InvokeModel API. For Claude v3 Sonnet, Messages API is required.

Otherwise, you'll get something like this (in Python):

exception: <class 'botocore.errorfactory.ValidationException'> - message: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.

Best,

Didier

profile pictureAWS
EXPERTE
beantwortet vor 3 Monaten
0

Thanks Didier and Riku. Riku that was it - thanks. I had enabled it in US East, but my code is using US West. Didier, also need refactor to Messages API as I got the same error after. Thanks for the answer!

DJL
beantwortet vor 3 Monaten
0

Hi, I could not find any docs on messages API in Golang SDK - bedrockruntime. The native anthropic API requires API_KEY and I wish to work with AWS bedrock service to use it in Golang

Previously I was using v2.1 which had huge response times and I was eagerly waiting for v3 but seems like I can't directly switch to it.

Arvi
beantwortet vor 3 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen