针对除us-east-1之外的区域的AWS CLI SSL问题

时间:2017-10-20 17:49:07

标签: amazon-web-services ssl amazon-s3 aws-cli

当我执行aws s3 ls并将默认区域设置为 us-east-1 时,

aws configure正在运行。 但如果我配置到不同的区域,它就无法正常工作。获取 [SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c:581)

AWS CLI版本:

awscli.clidriver - DEBUG - CLI version: aws-cli/1.11.168 Python/2.7.9 Windows/8 botocore/1.7.26

记录错误回复:

2017-10-20 11:33:19,944 - MainThread - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [GET]>
2017-10-20 11:33:19,947 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1): s3-us-west-1.amazonaws.com
2017-10-20 11:33:20,519 - MainThread - botocore.endpoint - DEBUG - ConnectionError received when sending HTTP request.
Traceback (most recent call last):
  File "botocore\endpoint.pyc", line 204, in _get_response
  File "botocore\vendored\requests\sessions.pyc", line 573, in send
  File "botocore\vendored\requests\adapters.pyc", line 431, in send
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
2017-10-20 11:33:20,520 - MainThread - botocore.hooks - DEBUG - Event needs-retry.s3.ListBuckets: calling handler <botocore.retryhandler.RetryHandler object at 0x00000000044A0EF0>
2017-10-20 11:33:20,522 - MainThread - botocore.retryhandler - DEBUG - retry needed, retryable exception caught: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
Traceback (most recent call last):
  File "botocore\retryhandler.pyc", line 269, in _should_retry
  File "botocore\retryhandler.pyc", line 317, in __call__
  File "botocore\retryhandler.pyc", line 223, in __call__
  File "botocore\retryhandler.pyc", line 359, in _check_caught_exception
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)

记录成功回复:

2017-10-20 11:36:16,812 - MainThread - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [GET]>
2017-10-20 11:36:16,812 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1): s3.amazonaws.com
2017-10-20 11:36:17,644 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - DEBUG - "GET / HTTP/1.1" 200 None
2017-10-20 11:36:17,645 - MainThread - botocore.parsers - DEBUG - Response headers: {'x-amz-id-2': 'V/gopI4wTPuqiSCf6jtxgdCw+583vTzO1hiSBVg8KCcasUwNtDLk2tvw6kRH76LM+J0ftFVlezI=', 'server': 'AmazonS3', 'transfer-encoding': 'chunked', 'x-amz-request-id': 'A4637632BE5A45E0', 'date': 'Fri, 20 Oct 2017 17:36:18 GMT', 'content-type': 'application/xml'}
2017-10-20 11:36:17,647 - MainThread - botocore.parsers - DEBUG - Response body:
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>......

以同样的方式,我无法在不属于us-east-1区域Image from AWS CLI

的桶中列出对象

0 个答案:

没有答案