I find a bug with code that connects to AWS using boto3. The error only started yesterday afternoon, and between the last I did not receive the error, and the first time I received the error, I do not see anything that has changed.
Error:
botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL:
In .aws / config I have:
$ cat ~/.aws/config [default] region=us-east-1
Here is what I know:
- Using the same AWS credentials and configuration on another computer, I see no error.
- Using different AWS credentials and configuration on the same computer, I see an error.
- I am the only one in our group who has this problem for any credentials on any machine.
I donβt think that I changed something that would affect it the last time it worked, and the first time it is not. It seems like I would have to change a specific AWS configuration on my side or on some low-level libraries, and I did not make such changes. I talked with a colleague for 30-45 minutes, and when I returned and picked up where I was staying, the question first appeared.
Any thoughts or troubleshooting ideas?
The following is a dump of a complete exception.
$ 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/"