Skip to content

Bedrock API invocation error - on demand throughput isn's supported

1

Hi,

I have subscribed to access several models in Amazon Bedrock, including Anthropic ones and accesses have already been granted. However, when accessing them through langchain, it gives the following error:

Error: Error 400: Invocation of model ID anthropic.claude-3-5-haiku-20241022-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.

I do not understand. What should I have done differently? Roberto

asked 2 years ago39.1K views

2 Answers
12

Hi,

You just have to replace the current value of model with with the ARN of an Inference Profile that you'll find on the Bedrock console in "Cross-Region Inference" tab

Enter image description here

Best,

Didier

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Great answer, thanks Didier.

    There's also a nice shortcut: Depending on the AWS region, you can simply prefix the model ID with us., eu., or apac. (at the time of writing, inference profiles aren't vailable in South America yet):

    In the case of Claude 3.5 Haiku that would be:

    • us.anthropic.claude-3-5-haiku-20241022-v1:0
    • eu.anthropic.claude-3-5-haiku-20241022-v1:0
    • apac.anthropic.claude-3-5-haiku-20241022-v1:0
3
Accepted Answer

The error you're encountering suggests that you're trying to invoke the Anthropic Claude 3 Haiku model using on-demand throughput, which is not supported for this particular model on Amazon Bedrock.

To resolve this issue, you need to use an inference profile that contains the Claude 3 Haiku model. Inference profiles in Amazon Bedrock allow you to configure and manage model invocations with specific settings, including throughput.

Here are the steps you should take:

  1. Go to the Amazon Bedrock console.
  2. Navigate to the "Inference profiles" section.
  3. Create a new inference profile or select an existing one that includes the Claude 3 Haiku model.
  4. Make sure the inference profile is properly configured with the desired settings for your use case.
  5. When making API calls or using Langchain, specify the ID or ARN (Amazon Resource Name) of this inference profile instead of directly using the model ID.

By using an inference profile, you'll be able to manage the throughput and other invocation settings for the Claude 3 Haiku model more effectively. This approach is required for certain models in Bedrock that don't support direct on-demand invocations.

If you continue to face issues after setting up and using an inference profile, double-check your AWS credentials, region settings, and ensure that your IAM permissions include the necessary actions to invoke models and use inference profiles in Amazon Bedrock.

Sources
Resolve InvokeModel API error in Amazon Bedrock | AWS re:Post
Community | Getting started with different LLMs on Amazon Bedrock

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.