- Newest
- Most votes
- Most comments
The connect timeout error you're experiencing suggests there might be a network connectivity issue between your EKS cluster in us-west-1 and the Bedrock endpoint in us-east-1. This could be caused by several factors:
-
Network Configuration: There might have been changes to the VPC, security groups, or network ACLs that are now blocking outbound traffic to the Bedrock endpoint.
-
DNS Resolution: Ensure that DNS resolution is working correctly within your EKS cluster, as the error suggests it's unable to resolve or connect to the Bedrock endpoint.
-
IAM Permissions: While you mentioned no changes to IAM policies, it's worth double-checking that the necessary permissions to access Bedrock are still in place and haven't been inadvertently modified.
-
Service Availability: Although unlikely, there could be a service issue with Bedrock in the us-east-1 region. Check the AWS Service Health Dashboard for any reported issues.
-
Cross-Region Latency: The fact that you're calling Bedrock in us-east-1 from us-west-1 introduces additional latency. Consider using a Bedrock endpoint in the same region as your EKS cluster if possible.
To troubleshoot this issue:
-
Verify network connectivity by attempting to ping or telnet to the Bedrock endpoint from within your EKS cluster.
-
Check your VPC's network configuration, including security groups and NACLs, to ensure outbound traffic to the Bedrock endpoint is allowed.
-
Review your IAM roles and policies to confirm they still have the necessary permissions to access Bedrock.
-
Try increasing the connect_timeout in your boto3 client configuration:
from botocore.config import Config config = Config(connect_timeout=30, retries={'max_attempts': 3}) client = boto3.client("bedrock-runtime", region_name="us-east-1", config=config) -
If possible, test the same code from an EC2 instance in the same VPC as your EKS cluster to isolate whether the issue is specific to EKS or affects the entire VPC.
-
Consider using AWS VPC endpoints for Bedrock to improve connectivity and reduce latency.
If the issue persists after these steps, it would be advisable to contact AWS support for further investigation, as there might be underlying service or network issues that are not immediately apparent.
Sources
Solving 'Read Timed Out' Error and High Latencies in Amazon Bedrock with AWS Java SDK Client | AWS re:Post
Unexpected Delay in Amazon Bedrock Response | AWS re:Post
Prevent read timeouts in Amazon Bedrock | AWS re:Post
answered a year ago
You can verify active inference profiles and potentially resolve the connection timeout issue, you should:
- List the inference profiles in the us-east-1 region using the AWS CLI command:
aws bedrock list-inference-profiles --region us-east-1
- If you see an output similar to the one you provided, with an active inference profile like:
{ "inferenceProfileArn": "arn:aws:bedrock:us-east-1:123456789012:inference-profile/us.amazon.nova-lite-v1:0", "models": [ { "modelArn": "arn:aws:bedrock:us-east-1::foundation-model/amazon.nova-lite-v1:0" }, { "modelArn": "arn:aws:bedrock:us-west-2::foundation-model/amazon.nova-lite-v1:0" }, { "modelArn": "arn:aws:bedrock:us-east-2::foundation-model/amazon.nova-lite-v1:0" } ], "inferenceProfileId": "us.amazon.nova-lite-v1:0", "status": "ACTIVE" }
-
Then use the
inferenceProfileIdas the model ID in your code. In this case, you would use "us.amazon.nova-lite-v1:0" as the model ID. -
Modify your code to use this inference profile ID:
client = boto3.client("bedrock-runtime", region_name="us-east-1") response = client.converse( modelId="us.amazon.nova-lite-v1:0", # Use the inference profile ID here messages=message_list, inferenceConfig={"maxTokens": 2000, "temperature": 0}, system=[{"text": "Helpful assistant."}] )
This approach should help resolve the connection timeout issue by using the correct inference profile for cross-region model access...
Relevant content
asked a year ago
asked 2 years ago
