创建了私有EC2实例,为S3创建了一个VPC端点(com.amazonaws.us-east-1.s3),我能够获取在us-east-1区域中存在的S3存储桶文件。
aws s3 ls s3://usbastiontesting --recursive
我在孟买地区有一个S3存储桶,无论如何我可以从私有EC2实例(N. Virginia)获取这些文件吗?
在命令下方使用,但它没有提取文件:
aws s3 ls s3://mumbaibastiontesting --recursive --region ap-south-1
投掷以下错误:
2018-06-12 11:09:42,874 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1): s3.ap-south-1.amazonaws.com
2018-06-12 11:10:42,938 - MainThread - botocore.endpoint - DEBUG - ConnectionError received when sending HTTP request.
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/botocore/endpoint.py", line 213, in _get_response
proxies=self.proxies, timeout=self.timeout)
File "/usr/lib/python2.7/dist-packages/botocore/vendored/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/botocore/vendored/requests/adapters.py", line 419, in send
raise ConnectTimeout(e, request=request)
ConnectTimeout: HTTPSConnectionPool(host='s3.ap-south-1.amazonaws.com', port=443): Max retries exceeded with url: /mumbaibastiontesting?prefix=&encoding-type=url (Caused by ConnectTimeoutError(<botocore.awsrequest.AWSHTTPSConnection object at 0x7f8fe99f86d0>, 'Connection to s3.ap-south-1.amazonaws.com timed out. (connect timeout=60)'))
请建议。
答案 0 :(得分:0)
目前,Endpoints不支持跨区域访问。如果您参考其中明确提到的Endpoints for S3的AWS文档
端点当前不支持跨区域请求 - 确保在与存储区相同的区域中创建端点。