How to specify scope in aws cloud command line tool for windows

I send this on the command line (I omit all other parameters that I know to work)

aws cloudformation create-stack ... --parameters ParameterKey=Region,ParameterValue=us-east-1

This gives:

Unable to construct an endpoint for cloudformation in region None

If I send the same exact parameters using https://console.aws.amazon.com/cloudformation web ui, it works.

How to specify an area using aws.exe for Windows? The .json file that I use as a template even has it by default, but it still doesn't accept it if I omit the scope from the command line

"Region": {"Type": "String", "Description": "Which region is launched", "Default": "us-east-1", "AllowedValues": ["us-east-1", " us-west-1 "," us-west-2 "," eu-west-1 "," ap-northeast-1 ",]}

in debug mode I get ...

 File "awscli\clidriver.pyc", line 206, in main File "awscli\clidriver.pyc", line 354, in __call__ File "awscli\clidriver.pyc", line 461, in __call__ File "awscli\clidriver.pyc", line 555, in invoke File "botocore\service.pyc", line 161, in get_endpoint File "botocore\endpoint.pyc", line 265, in create_endpoint File "botocore\regions.pyc", line 67, in construct_endpoint UnknownEndpointError: Unable to construct an endpoint for cloudformation in region None 2014-10-27 22:52:38,631 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255 
+7
amazon-web-services amazon-cloudformation
source share
2 answers

The scope is an argument to the aws command:

aws -region eu-west-1 cloudformation create-stack --stack-name ...

+9
source share

You can also configure it using aws configure or, if it is already executed, you can identify it in ~/.aws/config . Example:

 [default] region=us-east-1 

The regions are as follows. See second column.

 $ ec2-describe-regions REGION eu-central-1 ec2.eu-central-1.amazonaws.com REGION sa-east-1 ec2.sa-east-1.amazonaws.com REGION ap-northeast-1 ec2.ap-northeast-1.amazonaws.com REGION eu-west-1 ec2.eu-west-1.amazonaws.com REGION us-east-1 ec2.us-east-1.amazonaws.com REGION us-west-1 ec2.us-west-1.amazonaws.com REGION us-west-2 ec2.us-west-2.amazonaws.com REGION ap-southeast-2 ec2.ap-southeast-2.amazonaws.com REGION ap-southeast-1 ec2.ap-southeast-1.amazonaws.com 
+3
source share

All Articles