我是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密钥和密钥等凭证。
有人可以帮助弄清楚这个问题的原因。 非常感谢任何建议?
答案 0 :(得分:7)
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