import boto3
dynamodb = boto3.resource('dynamodb', region_name="us-east-1")
table = dynamodb.Table('user_logs')
response = table.scan()
上面的aws胶水作业脚本
我收到以下错误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)'))
为什么会发生这种情况?
答案 0 :(得分:2)
如果你的胶水脚本指向VPC,那么你需要为你配置的VPC创建VPC端点。
转到AWS VPC&gt;结束点&gt;为您的VPC创建dynamo db端点,然后尝试。