aws-samples / aws-samples/amazon-bedrock-samples
Inconsistent Connection of AWS Bedrock from Lambda
- Dominant language
- Jupyter Notebook
- Stars
- 1.5k
- Forks
- 734
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 4
Description
Hi Team!
We are trying to use AWS Bedrock from Lambda but there is some inconsistency again and again.
Sometime the Bedrock is connected and model gets invoked. but other times in the same lambda function with the same query/input it gets timeout.
[ERROR] 2024-09-12T02:53:02.888Z fed8c773-6e8d-47e0-9f15-23258903983a Unexpected error: Connect timeout on endpoint URL: "https://bedrock-runtime.ap-south-1.amazonaws.com/model/meta.llama3-8b-instruct-v1%3A0/invoke"
[ERROR] 2024-09-12T03:00:32.202Z fed8c773-6e8d-47e0-9f15-23258903983a Unexpected error: Connect timeout on endpoint URL: "https://bedrock-runtime.us-west-2.amazonaws.com/model/amazon.titan-embed-text-v2%3A0/invoke"
We are trying to use two different models from different region.
Contributor guide
Research direction
No files, tests, or entry points are mentioned. Start by reproducing the Lambda invocation with the two Bedrock models and compare the regional endpoint, networking, and timeout configuration; done means identifying why the same function intermittently times out and documenting a reliable fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100