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?
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With