Error raised by bedrock service: Read timeout on endpoint URL

0

I keep receiving a timeout error when invoking Claude v2 for long files but less than 1700 tokens. The error message reads AWSHTTPSConnectionPool(host='bedrock-runtime.us-east-1.amazonaws.com', port=443): Read timed out. (read timeout=60).

Flor
已提問 6 個月前檢視次數 2436 次
1 個回答
0

When generating text with large language models in AWS Bedrock, you may encounter read timeout errors from the botocore client used to communicate with the Bedrock endpoint. This is because large model queries can take longer to process and return a response, potentially exceeding the default botocore read timeout.

To prevent read timeouts, you can increase the botocore read timeout configuration. Here is an example of increasing the read timeout to 1000 seconds:

from boto3 import client
from botocore.config import Config

config = Config(read_timeout=1000)

client = boto3.client(service_name='bedrock-runtime', 
                      region_name='us-east-1',
                      config=config)
AWS
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南