boto3 を使用して AWS に接続するコードでエラーが発生しました。エラーは昨日の午後に始まったばかりで、最後にエラーが発生しなかったときと最初にエラーが発生したときとの間に、何も変わっていません。
エラーは次のとおりです。
botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL:
.aws/config には次のものがあります。
$ cat ~/.aws/config
[default]
region=us-east-1
私が知っていることは次のとおりです。
- 別のマシンで同じ AWS 認証情報と構成を使用しても、エラーは表示されません。
- 同じマシンで異なる AWS 資格情報と構成を使用すると、エラーが表示されます。
- 私たちのグループで、任意のマシンの資格情報でこの問題を抱えているのは私だけです。
これが最後に機能したときと最初に機能しなかったときの間に、これに影響を与えるような変更は何もしていないと思います。私の側で AWS 固有の設定を変更するか、いくつかの低レベル ライブラリを変更する必要があったようですが、そのような変更は行いませんでした。私は同僚と 30 ~ 45 分間話をしていましたが、戻って中断したところから話を始めると、最初に問題が発生しました。
これのトラブルシューティングに関する考えやアイデアはありますか?
完全な例外ダンプが続きます。
$ python
Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto3
>>> boto3.client('ec2').describe_regions()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/botocore/client.py", line 200, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Library/Python/2.7/site-packages/botocore/client.py", line 244, in _make_api_call
operation_model, request_dict)
File "/Library/Python/2.7/site-packages/botocore/endpoint.py", line 173, in make_request
return self._send_request(request_dict, operation_model)
File "/Library/Python/2.7/site-packages/botocore/endpoint.py", line 203, in _send_request
success_response, exception):
File "/Library/Python/2.7/site-packages/botocore/endpoint.py", line 267, in _needs_retry
caught_exception=caught_exception)
File "/Library/Python/2.7/site-packages/botocore/hooks.py", line 226, in emit
return self._emit(event_name, kwargs)
File "/Library/Python/2.7/site-packages/botocore/hooks.py", line 209, in _emit
response = handler(**kwargs)
File "/Library/Python/2.7/site-packages/botocore/retryhandler.py", line 183, in __call__
if self._checker(attempts, response, caught_exception):
File "/Library/Python/2.7/site-packages/botocore/retryhandler.py", line 250, in __call__
caught_exception)
File "/Library/Python/2.7/site-packages/botocore/retryhandler.py", line 273, in _should_retry
return self._checker(attempt_number, response, caught_exception)
File "/Library/Python/2.7/site-packages/botocore/retryhandler.py", line 313, in __call__
caught_exception)
File "/Library/Python/2.7/site-packages/botocore/retryhandler.py", line 222, in __call__
return self._check_caught_exception(attempt_number, caught_exception)
File "/Library/Python/2.7/site-packages/botocore/retryhandler.py", line 355, in _check_caught_exception
raise caught_exception
botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://ec2.us-east-1.amazonaws.com/"