AWS Glue Dynamobd Connection Timed out Error

1.6k views Asked by At
import boto3
dynamodb = boto3.resource('dynamodb', region_name="us-east-1")
table = dynamodb.Table('user_logs')
response = table.scan()

I got the following error for the above aws glue job script

botocore.vendored.requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='dynamodb.us-east-1.amazonaws.com', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<botocore.awsrequest.AWSHTTPSConnection object at 0x7f7c58942b50>, 'Connection to dynamodb.us-east-1.amazonaws.com timed out. (connect timeout=60)'))

Any ideas why this is happening?

1

There are 1 answers

0
Ajit Nagar On BEST ANSWER

if your glue script is pointing out to VPC then you need to create VPC endpoint for your configured VPC.

go to AWS VPC > end point > create dynamo db end point for your VPC and then try.