简体   繁体   中英

aws ec2 us-east-2 is an invalid region choice

I have created a new instance on us-east-2, configured the security groups, policies and access rules and I can see it running and access it via the browser. However, when I attempt to connect to it via the aws-cli, it tells me us-east-2 is an invalid choice for the region.

What am I missing here? It is clearly a region on AWS: 在此处输入图片说明

I am running Ubuntu and aws --version results in: aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-100-generic

I am trying to connect to the instance via aws ec2 get-console-output --instance-id XXXXXXXX --region us-east-2

You CLI version is outdated by 3 years and it doesn't know the new regions. Can you upgrade the CLI to 1.10.x and try?

$ aws --version
aws-cli/1.10.66 Python/2.7.12 Linux/3.14.35-28.38.amzn1.x86_64 botocore/1.4.56

$ aws ec2 describe-regions
{
    "Regions": [
        {
            "Endpoint": "ec2.us-east-2.amazonaws.com",
            "RegionName": "us-east-2"
        },

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM