0 votes
1 view
in AWS by (19.2k points)

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?

1 Answer

0 votes
by (44.6k points)

Use this command in the AWS CLI:

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

>> use your region (region list - http://docs.aws.amazon.com/general/latest/gr/rande.html)

Or you can use this to provide the region:

export AWS_DEFAULT_REGION=us-east-1 //your region has to be specified

Welcome to Intellipaat Community. Get your technical queries answered by top developers !