ThrottlingException while asynchronously invoking Bedrock Runtime in Lambda

1

Hey, I am using AWS Bedrock runtime client in AWS Lambda. So in python when I am trying to run multiple requests (6) to the claude2 model asynchronously using Threads, some times I get all the results and a lot of the times I get ThrottlingException saying too many attempts. The thing is, is there a way to avoid this from happening as it happens randomly, with the same input tokens and everything. Is it an infra related problem, also please guide me in fixing this. Thankyou.

1 回答
0

You have 2 options to consume a model via Bedrock, On-demand vs Provisioned Throughput.

As per the documentation https://docs.aws.amazon.com/bedrock/latest/userguide/quotas.html#quotas-runtime, latency differs by model and is directly proportional to the following conditions.

  • The number of input and output tokens
  • The total number of ongoing on-demand requests by all customers at the time.

You can purchase Provisioned Throughput to address your issue.
https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html

Please have a look at the below thread for a similar issue.
https://repost.aws/questions/QUC82MTlWlQNagsqEG2Hbxlw/aws-bedrock-throttlingexception-occurs-randomly-for-claude-2-1-runtime

profile pictureAWS
已回答 2 个月前
profile pictureAWS
专家
已审核 21 天前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则