Error You must specify a region when running command aws ecs list-container-instances

后端 未结 5 810
时光说笑
时光说笑 2021-02-01 00:25

I am trying to use aws container service as per the documentation in http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_GetStarted.html

The below error is th

5条回答
  •  醉酒成梦
    2021-02-01 00:51

    "You must specify a region" is a not an ECS specific error, it can happen with any AWS API/CLI/SDK command.

    For the CLI, either set the AWS_DEFAULT_REGION environment variable. e.g.

    export AWS_DEFAULT_REGION=us-east-1

    or add it into the command (you will need this every time you use a region-specific command)

    AWS_DEFAULT_REGION=us-east-1 aws ecs list-container-instances --cluster default

    or set it in the CLI configuration file: ~/.aws/config

    [default]
    region=us-east-1
    

    or pass/override it with the CLI call:

    aws ecs list-container-instances --cluster default --region us-east-1

提交回复
热议问题