我是 aws 的新手,我正在尝试使用 aws-cli 连接 aws,因为我熟悉命令行,并且想使用它来编写脚本来自动化该过程。
但是我收到如下错误:
_
attempt_number, caught_exception)
File "/usr/local/lib/python2.7/site-packages/botocore/retryhandler.py", line 359, in _check_caught_exception
raise caught_exception
EndpointConnectionError: Could not connect to the endpoint URL: "https://ec2.ap-southeast-1a.amazonaws.com/"
2017-07-08 20:30:52,763 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255
Could not connect to the endpoint URL: "https://ec2.ap-southeast-1a.amazonaws.com/"
我已经在配置文件中设置了配置文件用户。
[profile joey2]
output = json
region = ap-southeast-1a
api key 和 secret 等凭证配置正确。
谁能帮忙找出这个问题的原因。 非常感谢任何建议?
最佳答案
ap-southeast-1a
不是有效的 AWS 区域,您需要改用 ap-southeast-1
。您收到该连接错误是因为 https://ec2.ap-southeast-1a.amazonaws.com/ (这是您的输入区域试图解析的内容)不存在。您可以通过 EC2 Region documentation 验证这一点.
区域名称:亚太地区(新加坡)
地区: ap-southeast-1
端点: ec2.ap-southeast-1.amazonaws.com
延伸阅读
关于amazon-web-services - 无法使用 aws-cli 连接到 aws 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44986296/