Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "You must specify a region" when running any aws CLI command

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?

like image 825
user859375 Avatar asked Mar 20 '15 12:03

user859375


People also ask

How do I specify aws region?

Sign in to the AWS Management Console . Choose a service to go to that service's console. In the navigation bar, choose the name of the currently displayed Region. Then choose the Region to which you want to switch.

How do I get aws region from AWS CLI?

aws configure get region will get you the current region at that point in your script. If you are using a profile, then type aws configure get region --profile $PROFILE_NAME . This will return the region of the configuration, not the region that your aws cli invocation was performed from.

What is my default region name aws?

If you signed up for an AWS account on or after May 17, 2017, the default Region when you access a resource from the AWS Management Console is US East (Ohio) (us-east-2); for older accounts, the default Region is either US West (Oregon) (us-west-2) or US East (N.

How do I know my region in aws?

To find your Regions using the consoleOpen the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . From the navigation bar, view the options in the Region selector. Your EC2 resources for this Region are displayed on the EC2 Dashboard in the Resources section.


1 Answers

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.

like image 118
Peycho Dimitrov Avatar answered Sep 29 '22 23:09

Peycho Dimitrov