I am trying to run AWS command from my local MAC, but the connection keeps timing out and traceroute is unable to get to my s3.us-east.amazonaws.com.
I have run aws configure, on both my local mac and my ec2. It works on ec2 (not surprising), but not on my local MAC.
I have a single user who has sysadmin access.
As I said, AWS works on my ec2 instance and the following command yields the following.
Is there something else I need to do to get the AWS CLI to connect from my MAC?
[root@ip-172-31-26-40 ec2-user]# aws s3 ls
2019-11-19 19:55:14 wildrydes.denis.putnam
[root@ip-172-31-26-40 ec2-user]# aws s3api list-buckets
{
"Owner": {
"DisplayName": "denisputnam",
"ID": "22873dab63c6750106aa2bf9f5584754d9b5449067a07c5ab57841967022f3fc"
},
"Buckets": [
{
"CreationDate": "2019-11-19T19:55:14.000Z",
"Name": "wildrydes.denis.putnam"
}
]
}
[root@ip-172-31-26-40 ec2-user]#
Debug output:
Traceback (most recent call last):
File "site-packages/botocore/endpoint.py", line 200, in _do_get_response
File "site-packages/botocore/endpoint.py", line 244, in _send
File "site-packages/botocore/httpsession.py", line 287, in send
botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "https://iam.us-east.amazonaws.com/"
2019-12-04 17:20:51,304 - MainThread - botocore.hooks - DEBUG - Event needs-retry.iam.ListUsers: calling handler <botocore.retryhandler.RetryHandler object at 0x7ff818983250>
2019-12-04 17:20:51,304 - MainThread - botocore.retryhandler - DEBUG - retry needed, retryable exception caught: Connect timeout on endpoint URL: "https://iam.us-east.amazonaws.com/"
Traceback (most recent call last):
File "site-packages/urllib3/connection.py", line 157, in _new_conn
File "site-packages/urllib3/util/connection.py", line 84, in create_connection
File "site-packages/urllib3/util/connection.py", line 74, in create_connection
socket.timeout: timed out
This might have been answered here:
AWS S3 CLI - Could not connect to the endpoint URL
Essentially, perhaps your config file contains "us-east" instead of "us-east-1"
(The IAM timeout is trying to hit iam.us-east....But I dont think us-east without the 1 is an official region.)