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

user859375 picture user859375 · Mar 20, 2015 · Viewed 94.3k times · Source

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 thrown when running the command:

aws ecs list-container-instances --cluster default

You must specify a region. You can also configure your region by running "aws configure".

The documentation does not mention anything about specifying a default region. How do we do it in a console?

Answer

Peycho Dimitrov picture Peycho Dimitrov · Mar 20, 2015

I think you need to use for example:

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

This depends of your region of course.