阅读背景:

AWS S3 CLI - 无法连接到端点URL

来源:互联网 
$ aws s3 ls

Could not connect to the endpoint URL: "https://s3.us-east-1a.amazonaws.com/"

What could be the problem?

可能是什么问题呢?

3 个解决方案

#1


91  

You probably have something wrong in your default profile for the default region.

您的默认区域的默认配置文件可能有问题。

Check your file at ~/.aws/config, you have something like

检查你的文件〜/ .aws / config,你有类似的东西

[default]
region=us-east-1a
...

Fix the region to region=us-east-1 and then the command will work correctly

将区域修复为region = us-east-1,然后该命令将正常工作

#2


2  

The S3 endpoints are per-region, not per AZ:

S3端点是按区域划分的,而不是每个AZ:

https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region

https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region

In your case, it should be https://s3.amazonaws.com.

在您的情况下,它应该是https://s3.amazonaws.com。

#3


2  

first you use 'aws configure' then input the access key, and secret key, and the region. the region you input would be important for this problem. try to input something like 's3.us-east-1', not 's3.us-east-1a'. it will solve the issue.

首先使用'aws configure'然后输入访问密钥,密钥和区域。您输入的区域对此问题很重要。尝试输入类似's3.us-east-1'的东西,而不是's3.us-east-1a'。它会解决这个问题。


分享到: