Aws-cli: aws s3 ls - 不能 ls 存储桶

创建于 2015-04-01  ·  3评论  ·  资料来源: aws/aws-cli

[ jaffer@data-aw-prod ~]$ aws --version
aws-cli/1.7.18 Python/2.6.9 Linux/3.14.35-28.38.amzn1.x86_64
[ jaffer@data-aw-prod ~]$

[ jaffer@data-aw-prod ~]$ aws s3 ls --debug
2015-04-01 11:56:42,132 - MainThread - awscli.clidriver - DEBUG - CLI 版本:aws-cli/1.7.18 Python/2.6.9 Linux/3.14.35-28.38.amzn1.x86_64,botocore 版本: .0
2015-04-01 11:56:42,132 - MainThread - awscli.clidriver - DEBUG - 输入到 CLI 的参数:['s3'、'ls'、'--debug']
2015-04-01 11:56:42,132 - MainThread - botocore.hooks - DEBUG - 事件会话初始化:调用处理程序
2015-04-01 11:56:42,132 - MainThread - botocore.hooks - DEBUG - 事件会话初始化:调用处理程序
2015-04-01 11:56:42,133-主线程-botocore.hooks-调试-事件构建命令表.s3:调用处理程序
2015-04-01 11:56:42,134-主线程-botocore.hooks-调试-事件加载-cli-arg.custom.s3.anonymous:调用处理程序
2015-04-01 11:56:42,134 - 主线程 - botocore.hooks - 调试 - 事件构建命令表.ls:调用处理程序
2015-04-01 11:56:42,135-主线程-botocore.hooks-调试-事件加载-cli-arg.custom.ls.paths:调用处理程序
2015-04-01 11:56:42,135-主线程-botocore.hooks-调试-事件加载-cli-arg.custom.ls.summarize:调用处理程序
2015-04-01 11:56:42,135-主线程-botocore.hooks-调试-事件进程-cli-arg.custom.ls:调用处理程序
2015-04-01 11:56:42,135-主线程-awscli.argprocess-调试-检测到的结构:标量
2015-04-01 11:56:42,135-主线程-botocore.hooks-调试-事件加载-cli-arg.custom.ls.anonymous:调用处理程序
2015-04-01 11:56:42,135-主线程-botocore.hooks-调试-事件加载cli-arg.custom.ls.human-readable:调用处理程序
2015-04-01 11:56:42,135-主线程-botocore.hooks-调试-事件进程-cli-arg.custom.ls:调用处理程序
2015-04-01 11:56:42,136-主线程-awscli.argprocess-调试-检测到的结构:标量
2015-04-01 11:56:42,136-主线程-botocore.hooks-调试-事件加载cli-arg.custom.ls.page-size:调用处理程序
2015-04-01 11:56:42,136 - MainThread - botocore.credentials - DEBUG - 通过以下方式寻找凭据:env
2015-04-01 11:56:42,136 - MainThread - botocore.credentials - INFO - 在环境变量中找到凭据。
2015-04-01 11:56:42,215 - MainThread - botocore.client - DEBUG - 为服务注册重试处理程序:s3
2015-04-01 11:56:42,215 - MainThread - botocore.client - DEBUG - 为服务注册重试处理程序:s3
2015-04-01 11:56:42,221 - MainThread - botocore.hooks - DEBUG - 事件 before-call.s3.ListBuckets:调用处理程序
2015-04-01 11:56:42,221 - 主线程 - botocore.endpoint - 调试 - 提出请求(verify_ssl=True) with params: {'query_string': '', 'headers': {}, 'url_path': '/', 'body': '', 'method': u'GET'}
2015-04-01 11:56:42,221 - MainThread - botocore.hooks - DEBUG - 事件 request-created.s3.ListBuckets:调用处理程序>
2015-04-01 11:56:42,221 - MainThread - botocore.hooks - DEBUG - 事件 before-sign.s3.ListBuckets:调用处理程序
2015-04-01 11:56:42,222 - 主线程 - botocore.auth - 调试 - 使用 v4 身份验证计算签名。
2015-04-01 11:56:42,222 - 主线程 - botocore.auth - 调试 - CanonicalRequest:
得到
/

主机:s3.us-east.amazonaws.com
用户代理:aws-cli/1.7.18 Python/2.6.9 Linux/3.14.35-28.38.amzn1.x86_64
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-日期:20150401T155642Z

主机;用户代理;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2015-04-01 11:56:42,222-主线程-botocore.auth-调试-StringToSign:
AWS4-HMAC-SHA256
20150401T155642Z
20150401/us-east/s3/aws4_request
e0002ea5e32486a5cd7a2014cf22368b82951adb37d010bd31ffd4ec5a5c3b5b
2015-04-01 11:56:42,222 - 主线程 - botocore.auth - 调试 - 签名:
183a8b6e48fe85f9713139c4763e1af3ba68c8b5aa38fdb03d0fe38d65e8ee2c
2015-04-01 11:56:42,228 - MainThread - botocore.endpoint - DEBUG - 发送 http 请求: 2015-04-01 11:56:42,229 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - 启动新的 HTTPS 连接 (1):s3.us-east.amazonaws.com
2015-04-01 11:56:42,231 - MainThread - botocore.hooks - DEBUG - 事件需要-retry.s3.ListBuckets:调用处理程序
2015-04-01 11:56:42,231 - MainThread - botocore.retryhandler - DEBUG - 需要重试,可重试异常被捕获:无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/
回溯(最近一次调用最后一次):
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 265 行,在 _should_retry
返回 self._checker(attempt_number, response,catch_exception)
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 313 行,在 __call__ 中
捕获异常)
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第222行,调用中
返回 self._check_caught_exception(attempt_number,catch_exception)
_check_caught_exception 中的文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 355 行
引发 catch_exception
EndpointConnectionError:无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/
2015-04-01 11:56:42,232 - 主线程 - botocore.retryhandler - 调试 - 需要重试,操作:0.322988676199
2015-04-01 11:56:42,232 - MainThread - botocore.endpoint - DEBUG - 收到重试响应,休眠 0.322988676199 秒
2015-04-01 11:56:42,555-主线程-botocore.hooks-调试-事件请求-created.s3.ListBuckets:调用处理程序>
2015-04-01 11:56:42,556 - MainThread - botocore.hooks - DEBUG - 事件 before-sign.s3.ListBuckets:调用处理程序
2015-04-01 11:56:42,556 - MainThread - botocore.auth - DEBUG - 使用 v4 auth 计算签名。
2015-04-01 11:56:42,556 - 主线程 - botocore.auth - 调试 - CanonicalRequest:
得到
/

主机:s3.us-east.amazonaws.com
用户代理:aws-cli/1.7.18 Python/2.6.9 Linux/3.14.35-28.38.amzn1.x86_64
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-日期:20150401T155642Z

主机;用户代理;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2015-04-01 11:56:42,557-主线程-botocore.auth-调试-StringToSign:
AWS4-HMAC-SHA256
20150401T155642Z
20150401/us-east/s3/aws4_request
e0002ea5e32486a5cd7a2014cf22368b82951adb37d010bd31ffd4ec5a5c3b5b
2015-04-01 11:56:42,557 - 主线程 - botocore.auth - 调试 - 签名:
183a8b6e48fe85f9713139c4763e1af3ba68c8b5aa38fdb03d0fe38d65e8ee2c
2015-04-01 11:56:42,557 - MainThread - botocore.endpoint - DEBUG - 发送 http 请求: 2015-04-01 11:56:42,558 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - 开始新的 HTTPS 连接(2):s3.us-east.amazonaws.com
2015-04-01 11:56:42,559 - MainThread - botocore.hooks - DEBUG - 事件需要-retry.s3.ListBuckets:调用处理程序
2015-04-01 11:56:42,559 - MainThread - botocore.retryhandler - DEBUG - 需要重试,可重试异常被捕获:无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/
回溯(最近一次调用最后一次):
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 265 行,在 _should_retry
返回 self._checker(attempt_number, response,catch_exception)
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 313 行,在 __call__ 中
捕获异常)
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第222行,调用中
返回 self._check_caught_exception(attempt_number,catch_exception)
_check_caught_exception 中的文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 355 行
引发 catch_exception
EndpointConnectionError:无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/
2015-04-01 11:56:42,559 - 主线程 - botocore.retryhandler - 调试 - 需要重试,操作:0.75575215895
2015-04-01 11:56:42,559 - MainThread - botocore.endpoint - DEBUG - 收到重试响应,休眠 0.75575215895 秒
2015-04-01 11:56:43,316 - MainThread - botocore.hooks - DEBUG - 事件 request-created.s3.ListBuckets:调用处理程序>
2015-04-01 11:56:43,317 - MainThread - botocore.hooks - DEBUG - 事件 before-sign.s3.ListBuckets:调用处理程序
2015-04-01 11:56:43,317 - 主线程 - botocore.auth - 调试 - 使用 v4 身份验证计算签名。
2015-04-01 11:56:43,317 - 主线程 - botocore.auth - 调试 - CanonicalRequest:
得到
/

主机:s3.us-east.amazonaws.com
用户代理:aws-cli/1.7.18 Python/2.6.9 Linux/3.14.35-28.38.amzn1.x86_64
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-日期:20150401T155643Z

主机;用户代理;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2015-04-01 11:56:43,317 - 主线程 - botocore.auth - 调试 - StringToSign:
AWS4-HMAC-SHA256
20150401T155643Z
20150401/us-east/s3/aws4_request
2b218ca18cc6f59827d9cc6ccc4c222ed77e7b2b9e1fd6aa4242e406e7e404ec
2015-04-01 11:56:43,318 - 主线程 - botocore.auth - 调试 - 签名:
1e99b5f508a30bfa547607d915aec56f9667e6c6db66dc65643202822314c377
2015-04-01 11:56:43,318 - 主线程 - botocore.endpoint - 调试 - 发送 http 请求: 2015-04-01 11:56:43,319 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - 信息 - 启动新的 HTTPS 连接(3):s3.us-east.amazonaws.com
2015-04-01 11:56:43,320 - MainThread - botocore.hooks - DEBUG - 事件需要-retry.s3.ListBuckets:调用处理程序
2015-04-01 11:56:43,320 - MainThread - botocore.retryhandler - DEBUG - 需要重试,可重试异常被捕获:无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/
回溯(最近一次调用最后一次):
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 265 行,在 _should_retry
返回 self._checker(attempt_number, response,catch_exception)
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 313 行,在 __call__ 中
捕获异常)
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第222行,调用中
返回 self._check_caught_exception(attempt_number,catch_exception)
_check_caught_exception 中的文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 355 行
引发 catch_exception
EndpointConnectionError:无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/
2015-04-01 11:56:43,320 - 主线程 - botocore.retryhandler - 调试 - 需要重试,操作:2.18930448654
2015-04-01 11:56:43,320 - MainThread - botocore.endpoint - DEBUG - 收到重试响应,休眠 2.18930448654 秒
2015-04-01 11:56:45,512 - MainThread - botocore.hooks - DEBUG - 事件 request-created.s3.ListBuckets:调用处理程序>
2015-04-01 11:56:45,512 - MainThread - botocore.hooks - DEBUG - 事件 before-sign.s3.ListBuckets:调用处理程序
2015-04-01 11:56:45,513 - 主线程 - botocore.auth - 调试 - 使用 v4 身份验证计算签名。
2015-04-01 11:56:45,513 - 主线程 - botocore.auth - 调试 - CanonicalRequest:
得到
/

主机:s3.us-east.amazonaws.com
用户代理:aws-cli/1.7.18 Python/2.6.9 Linux/3.14.35-28.38.amzn1.x86_64
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-日期:20150401T155645Z

主机;用户代理;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2015-04-01 11:56:45,513 - 主线程 - botocore.auth - 调试 - StringToSign:
AWS4-HMAC-SHA256
20150401T155645Z
20150401/us-east/s3/aws4_request
48ccbdbf0fd162f787956abaeec2bcc73a92b5cd03e23bbfcf20f9721cd629cf
2015-04-01 11:56:45,513 - 主线程 - botocore.auth - 调试 - 签名:
715db569aa580b92850617e41db4d78d4a8eb5ccc51018bf3500272d98bb1502
2015-04-01 11:56:45,513 - 主线程 - botocore.endpoint - 调试 - 发送 http 请求: 2015-04-01 11:56:45,514 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - 开始新的 HTTPS 连接(4):s3.us-east.amazonaws.com
2015-04-01 11:56:45,515 - MainThread - botocore.hooks - DEBUG - 事件需要-retry.s3.ListBuckets:调用处理程序
2015-04-01 11:56:45,515 - MainThread - botocore.retryhandler - DEBUG - 需要重试,可重试异常被捕获:无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/
回溯(最近一次调用最后一次):
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 265 行,在 _should_retry
返回 self._checker(attempt_number, response,catch_exception)
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 313 行,在 __call__ 中
捕获异常)
文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第222行,调用中
返回 self._check_caught_exception(attempt_number,catch_exception)
_check_caught_exception 中的文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 355 行
引发 catch_exception
EndpointConnectionError:无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/
2015-04-01 11:56:45,515 - 主线程 - botocore.retryhandler - 调试 - 需要重试,操作:0.576300993129
2015-04-01 11:56:45,515 - 主线程 - botocore.endpoint - 调试 - 收到重试响应,休眠 0.576300993129 秒
2015-04-01 11:56:46,092 - MainThread - botocore.hooks - DEBUG - 事件 request-created.s3.ListBuckets:调用处理程序>
2015-04-01 11:56:46,092 - MainThread - botocore.hooks - DEBUG - 事件 before-sign.s3.ListBuckets:调用处理程序
2015-04-01 11:56:46,093 - MainThread - botocore.auth - DEBUG - 使用 v4 auth 计算签名。
2015-04-01 11:56:46,093 - 主线程 - botocore.auth - 调试 - CanonicalRequest:
得到
/

主机:s3.us-east.amazonaws.com
用户代理:aws-cli/1.7.18 Python/2.6.9 Linux/3.14.35-28.38.amzn1.x86_64
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-日期:20150401T155646Z

主机;用户代理;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2015-04-01 11:56:46,093 - 主线程 - botocore.auth - 调试 - StringToSign:
AWS4-HMAC-SHA256
20150401T155646Z
20150401/us-east/s3/aws4_request
18c5d85e0996b1ed77b2e06c0cc78b476cdb1a25d05a13f665c82a9066d61ef4
2015-04-01 11:56:46,093 - 主线程 - botocore.auth - 调试 - 签名:
d6c4ab22c43a2765e219ebe83cdebbbdae61c6b300445fec73f67ff0bc526507
2015-04-01 11:56:46,094 - MainThread - botocore.endpoint - DEBUG - 发送 http 请求: 2015-04-01 11:56:46,094 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - 信息 - 启动新的 HTTPS 连接(5):s3.us-east.amazonaws.com
2015-04-01 11:56:46,095 - MainThread - botocore.hooks - DEBUG - 事件需要-retry.s3.ListBuckets:调用处理程序
2015-04-01 11:56:46,095 - MainThread - awscli.clidriver - DEBUG - 在 main() 中捕获异常
回溯(最近一次调用最后一次):
文件“/usr/local/lib/python2.6/site-packages/awscli/clidriver.py”,第 183 行,在主目录中
返回 command_table parsed_args.command
文件“/usr/local/lib/python2.6/site-packages/awscli/customizations/commands.py”,第 190 行,调用中
parsed_globals)
文件“/usr/local/lib/python2.6/site-packages/awscli/customizations/commands.py”,第 187 行,调用中
返回 self._run_main(parsed_args, parsed_globals)
文件“/usr/local/lib/python2.6/site-packages/awscli/customizations/s3/subcommands.py”,第 324 行,在 _run_main 中
self._list_all_buckets()
_list_all_buckets 中的文件“/usr/local/lib/python2.6/site-packages/awscli/customizations/s3/subcommands.py”,第 383 行
response_data = self.client.list_buckets()
_api_call 中的文件“/usr/local/lib/python2.6/site-packages/botocore/client.py”,第 187 行
返回 self._make_api_call(operation_name, kwargs)
_make_api_call 中的文件“/usr/local/lib/python2.6/site-packages/botocore/client.py”,第 231 行
操作模型,请求字典)
文件“/usr/local/lib/python2.6/site-packages/botocore/endpoint.py”,第 173 行,在 make_request 中
返回 self._send_request(request_dict, operation_model)
文件“/usr/local/lib/python2.6/site-packages/botocore/endpoint.py”,第 203 行,在 _send_request 中
成功响应,异常):
文件“/usr/local/lib/python2.6/site-packages/botocore/endpoint.py”,第 267 行,在 _needs_retry
捕获异常=捕获异常)
文件“/usr/local/lib/python2.6/site-packages/botocore/hooks.py”,第226行,在emit中
返回 self._emit(event_name, kwargs)
文件“/usr/local/lib/python2.6/site-packages/botocore/hooks.py”,第 209 行,在 _emit
响应 = 处理程序( kwargs)文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 183 行,在 __call__ 中如果 self._checker(尝试,响应,catch_exception):文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 250 行,在 __call__ 中捕获异常)文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 273 行,在 _should_retry返回 self._checker(attempt_number, response,catch_exception)文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 313 行,在 __call__ 中捕获异常)文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 222 行,在 **call
返回 self._check_caught_exception(attempt_number,catch_exception)
_check_caught_exception 中的文件“/usr/local/lib/python2.6/site-packages/botocore/retryhandler.py”,第 355 行
引发 catch_exception
EndpointConnectionError:无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/
2015-04-01 11:56:46,096 - 主线程 - awscli.clidriver - 调试 - 以 rc 255 退出

无法连接到端点 URL:“ https://s3.us-east.amazonaws.com/

知道它使用的是什么https://s3.us-east.amazonaws.com/而不是https://us-east-1.s3.amazonaws.com/

最有用的评论

专业提示:可能来自 ~/.aws/config。 临时移动此文件并重试。 这对我有帮助。

所有3条评论

[ jaffer@data-aw-prod ~]$ aws s3 ls --debug --endpoint-url https://us-east-1.s3.amazonaws.com/
2015-04-02 10:00:53,814 - MainThread - awscli.clidriver - DEBUG - CLI 版本:aws-cli/1.7.18 Python/2.6.9 Linux/3.14.35-28.38.amzn1.x86_64,botocore 版本: .0
2015-04-02 10:00:53,814 - MainThread - awscli.clidriver - DEBUG - 输入到 CLI 的参数:['s3', 'ls', '--debug', '--endpoint-url', ' https: //us-east-1.s3.amazonaws.com/ ']
2015-04-02 10:00:53,814 - MainThread - botocore.hooks - DEBUG - 事件会话初始化:调用处理程序
2015-04-02 10:00:53,815 - MainThread - botocore.hooks - DEBUG - 事件会话初始化:调用处理程序
2015-04-02 10:00:53,815 - 主线程 - botocore.hooks - 调试 - 事件构建命令表.s3:调用处理程序
2015-04-02 10:00:53,816-主线程-botocore.hooks-调试-事件加载-cli-arg.custom.s3.anonymous:调用处理程序
2015-04-02 10:00:53,816 - MainThread - botocore.hooks - DEBUG - 事件构建命令表.ls:调用处理程序
2015-04-02 10:00:53,817-主线程-botocore.hooks-调试-事件加载-cli-arg.custom.ls.paths:调用处理程序
2015-04-02 10:00:53,817-主线程-botocore.hooks-调试-事件加载-cli-arg.custom.ls.summarize:调用处理程序
2015-04-02 10:00:53,817-主线程-botocore.hooks-调试-事件进程-cli-arg.custom.ls:调用处理程序
2015-04-02 10:00:53,817-主线程-awscli.argprocess-调试-检测到的结构:标量
2015-04-02 10:00:53,817-主线程-botocore.hooks-调试-事件加载-cli-arg.custom.ls.anonymous:调用处理程序
2015-04-02 10:00:53,817-主线程-botocore.hooks-调试-事件加载cli-arg.custom.ls.human-readable:调用处理程序
2015-04-02 10:00:53,817-主线程-botocore.hooks-调试-事件进程-cli-arg.custom.ls:调用处理程序
2015-04-02 10:00:53,818-主线程-awscli.argprocess-调试-检测到的结构:标量
2015-04-02 10:00:53,818-主线程-botocore.hooks-调试-事件加载cli-arg.custom.ls.page-size:调用处理程序
2015-04-02 10:00:53,818 - MainThread - botocore.credentials - DEBUG - 通过以下方式寻找凭据:env
2015-04-02 10:00:53,818 - MainThread - botocore.credentials - INFO - 在环境变量中找到凭据。
2015-04-02 10:00:53,896 - MainThread - botocore.client - DEBUG - 为服务注册重试处理程序:s3
2015-04-02 10:00:53,896 - MainThread - botocore.client - DEBUG - 为服务注册重试处理程序:s3
2015-04-02 10:00:53,901 - MainThread - botocore.hooks - DEBUG - 事件 before-call.s3.ListBuckets:调用处理程序
2015-04-02 10:00:53,901 - 主线程 - botocore.endpoint - 调试 - 提出请求(verify_ssl=True) with params: {'query_string': '', 'headers': {}, 'url_path': '/', 'body': '', 'method': u'GET'}
2015-04-02 10:00:53,901 - MainThread - botocore.hooks - DEBUG - 事件 request-created.s3.ListBuckets:调用处理程序>
2015-04-02 10:00:53,902 - MainThread - botocore.auth - DEBUG - 使用 v4 auth 计算签名。
2015-04-02 10:00:53,902 - 主线程 - botocore.auth - 调试 - CanonicalRequest:
得到
/

主机:us-east-1.s3.amazonaws.com
用户代理:aws-cli/1.7.18 Python/2.6.9 Linux/3.14.35-28.38.amzn1.x86_64
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-日期:20150402T140053Z

主机;用户代理;x-amz-content-sha256;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2015-04-02 10:00:53,902-主线程-botocore.auth-调试-StringToSign:
AWS4-HMAC-SHA256
20150402T140053Z
20150402/us-east/s3/aws4_request
c2f10df0a6273531a1c59de88a43aa15d54e0ff0d4efb446bfc413f423a40b6e
2015-04-02 10:00:53,902 - 主线程 - botocore.auth - 调试 - 签名:
bbea77bb9355119c47ea3fb62edd0e3ffd32dab9733698f8f82ea7bebba32e99
2015-04-02 10:00:53,909 - MainThread - botocore.endpoint - DEBUG - 发送 http 请求: 2015-04-02 10:00:53,909 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - 信息 - 启动新的 HTTPS 连接 (1):us-east-1.s3.amazonaws.com
2015-04-02 10:00:53,939 - 主线程 - botocore.vendored.requests.packages.urllib3.connectionpool - 调试 - “GET / HTTP/1.1” 400 无
2015-04-02 10:00:53,941-主线程-botocore.parsers-调试-响应头:
{'连接':'关闭',
'内容类型':'应用程序/xml',
'date': '2015 年 4 月 2 日星期四 14:00:53 GMT',
'服务器':'亚马逊S3',
'传输编码':'分块',
'x-amz-id-2':'4YKK6iKMv28//rCRHQDedKvJsyuEXgvY=',
'x-amz-请求-id':''}
2015-04-02 10:00:53,941-主线程-botocore.parsers-调试-响应正文:

AuthorizationHeaderMalformed授权头格式错误; 'us-east' 区域是错误的; 期待“us-east-1”us-east-1CCAA61953FE3FAD04YKK6iKMv28/bEd3R50qcUidwIza8ckHiPcuVvrX2cZLWDPfx7nvqsz/rCRHQDedKvJsyuEXgvY=
2015-04-02 10:00:53,942 - MainThread - botocore.hooks - DEBUG - 事件需要-retry.s3.ListBuckets:调用处理程序
2015-04-02 10:00:53,942 - 主线程 - botocore.retryhandler - 调试 - 无需重试。
2015-04-02 10:00:53,942 - MainThread - botocore.hooks - DEBUG - 事件 after-call.s3.ListBuckets:调用处理程序
2015-04-02 10:00:53,942 - MainThread - botocore.hooks - DEBUG - 事件 after-call.s3.ListBuckets:调用处理程序
2015-04-02 10:00:53,942-主线程-awscli.errorhandler-调试-HTTP 响应代码:400
2015-04-02 10:00:53,942 - MainThread - awscli.clidriver - DEBUG - 在 main() 中捕获异常
回溯(最近一次调用最后一次):
文件“/usr/local/lib/python2.6/site-packages/awscli/clidriver.py”,第 183 行,在主目录中
返回 command_table parsed_args.command
文件“/usr/local/lib/python2.6/site-packages/awscli/customizations/commands.py”,第 190 行,调用中
parsed_globals)
文件“/usr/local/lib/python2.6/site-packages/awscli/customizations/commands.py”,第 187 行,调用中
返回 self._run_main(parsed_args, parsed_globals)
文件“/usr/local/lib/python2.6/site-packages/awscli/customizations/s3/subcommands.py”,第 324 行,在 _run_main 中
self._list_all_buckets()
_list_all_buckets 中的文件“/usr/local/lib/python2.6/site-packages/awscli/customizations/s3/subcommands.py”,第 383 行
response_data = self.client.list_buckets()
_api_call 中的文件“/usr/local/lib/python2.6/site-packages/botocore/client.py”,第 187 行
返回 self._make_api_call(operation_name, kwargs)
_make_api_call 中的文件“/usr/local/lib/python2.6/site-packages/botocore/client.py”,第 238 行
模型=操作模型
文件“/usr/local/lib/python2.6/site-packages/botocore/hooks.py”,第226行,在emit中
返回 self._emit(event_name, kwargs)
文件“/usr/local/lib/python2.6/site-packages/botocore/hooks.py”,第 209 行,在 _emit
响应 = 处理程序(**kwargs)
文件“/usr/local/lib/python2.6/site-packages/awscli/errorhandler.py”,第 70 行,在 __call__ 中
http_status_code=http_response.status_code)
ClientError:调用ListBuckets操作时发生客户端错误(AuthorizationHeaderMalformed):授权头格式错误; 'us-east' 区域是错误的; 期待“us-east-1”
2015-04-02 10:00:53,944 - 主线程 - awscli.clidriver - 调试 - 以 rc 255 退出

调用ListBuckets操作时出现客户端错误(AuthorizationHeaderMalformed):授权头格式错误; 'us-east' 区域是错误的; 期待“us-east-1”

专业提示:可能来自 ~/.aws/config。 临时移动此文件并重试。 这对我有帮助。

谢谢@joshunger
转到 ~/.aws/config
移动配置文件
转到终端并输入 aws configure
添加 ID 和密钥
输入 aws s3 ls
查看所有目录

此页面是否有帮助?
0 / 5 - 0 等级