AWS CLI : Could not connect to the endpoint URL : "https://sts.amazonaws.com/"

Viewed 24840

We have trouble to execute any command on Windows AWS CLI. After AWS Configure as follows, almost every command returns the sts access error.

-- AWS Configure
aws_access_key_id=XXXXXXXX
anw_secreat_key_id=XXXXXXX
region=ap-northeast-1
output = json

-- command & error message
aws s3 ls
Could not connect to the endpoint URL : "https://sts.amazonaws.com/"

If you went trought the same kind of issue, could you kindly tell me what should be re-configured or added, like any special security group etc. ?

Any advice would be appreciated again.

3 Answers

I was having this issue as well. The problem was with my machine. Running ipconfig /renew on my Windows 10 machine solved the problem.

Hopefully this helps someone else some day.

Thanks to all kind advice, we could finally manage S3 from EC2 instance to revise our endpoint -- add our bucket namely to endpoint policy.

{
    "Version": "2012-10-17",
    "Id": "XXXXXXXXXXXX",
    "Statement": [
        {
            "Sid": "XXXXXXXXXXX",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::s3-XXXXXX",
                "arn:aws:s3:::s3-XXXXXX/*"
            ]
        }
    ]
}

But still we seems to have some issue to connect STS (Amazon Security Token Service), maybe due to other cause. Let me ask it by other thread after my further verifications.

Regards

Related