无法使用aws-cli连接到aws服务 [英] could not connect to aws services using aws-cli

查看:180
本文介绍了无法使用aws-cli连接到aws服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是aws的新手,我尝试使用aws-cli来连接aws,因为我对命令行很满意,并且想用它来编写脚本来自动执行该过程.

I am new to aws, I am trying to use aws-cli to connect aws as I am confortable with commandline, and want to use to write the script to automate the process.

但是我遇到如下错误:

_
    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/"

我已经在配置文件中设置了配置文件用户.

I have setup the profile user as in the config file.

[profile joey2]
output = json
region = ap-southeast-1a

诸如api密钥和密钥之类的凭据已正确配置.

the credential such as api key and secret is configured properly.

有人可以帮助找出导致此问题的原因吗.非常感谢您提供任何建议?

Could someone help to figure out what is cause of this issue. highly appreciate for any advice?

推荐答案

ap-southeast-1a 不是有效的AWS区域,您需要使用 ap-southeast-1 代替.您收到该连接错误的原因是 https://ec2.ap-southeast-1a.amazonaws.com/(您的输入区域试图解析的内容)不存在.您可以通过 EC2地区文档进行验证.

ap-southeast-1a is not a valid AWS Region, you need to use ap-southeast-1 instead. You're getting that connection error because https://ec2.ap-southeast-1a.amazonaws.com/ (which is what your input region is attempting to resolve to) does not exist. You can verify this via the EC2 Region documentation.

地区名称:亚太地区(新加坡)
地区:ap-southeast-1
端点:ec2.ap-southeast-1.amazonaws.com

Region Name: Asia Pacific (Singapore)
Region: ap-southeast-1
Endpoint: ec2.ap-southeast-1.amazonaws.com

这篇关于无法使用aws-cli连接到aws服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆