- Newest
- Most votes
- Most comments
I'm sorry, my fault, I misunderstood.
As described in Create a stack set with self-managed permissions using the AWS CLI:
When you create stack sets using the AWS CLI, you run two separate commands. During create-stack-set, you upload your template, create the stack set container, and manage automatic deployments. During create-stack-instances, you create stack instances in specific target accounts.
aws cli create-stack-set
aws cloudformation create-stack-set \
--stack-set-name my-awsconfig-stackset \
--template-url https://s3.amazonaws.com/cloudformation-stackset-sample-templates-us-east-1/EnableAWSConfig.yml
aws cli create-stack-instances:
aws cloudformation create-stack-instances \
--stack-set-name my-awsconfig-stackset \
--accounts '["account_ID_1","account_ID_2"]' \
--regions '["region_1","region_2"]' \
--operation-preferences FailureToleranceCount=0,MaxConcurrentCount=1
so about regions where the stacks within a stack set are deployed to , you need to refer to the Regions.member.N in the CreateStackInstance API.
CreateStackInstances:
Creates stack instances for the specified accounts, within the specified AWS Regions. A stack instance refers to a stack in a specific account and Region. You must specify at least one value for either Accounts or
DeploymentTargets, and you must specify at least one value forRegions.
Regions.member.N
The names of one or more AWS Regions where you want to create stack instances using the specified AWS accounts.
Sample Request
https://cloudformation.us-east-1.amazonaws.com/
?Action=CreateStackInstances
&Version=2010-05-15
&StackSetName=stack-set-example
&Regions.member.1=us-east-1
&Regions.member.2=us-west-2
&OperationPreferences.MaxConcurrentCount=5
&OperationPreferences.FailureTolerancePercentage=10
&Accounts.member.1=[account]
&Accounts.member.2=[account]
&OperationId=c424b651-2fda-4d6f-a4f1-20c0example
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=[Access key ID and scope]
&X-Amz-Date=20170810T233349Z
&X-Amz-SignedHeaders=content-type;host
&X-Amz-Signature=[Signature]
Hello.
According to my understanding.
As best I can tell, the CreateStackSet API does not allow you to specify which regions to deploy stacks to, when creating a service-managed stack set.
In fact, in the Examples of the CreateStackSet API you mentioned, you can see that the request address of the Sample Request is https://cloudformation.us-east-1.amazonaws.com/, where us-east-1 is the region where the stackset is created. If you open the Network of the developer tools in your browser and then switch regions in the Cloudformation console, you will find that the address in the Request URL will change. If you want to specify the region when calling the API, you only need to change the region in the request URL like:
- Asia Pacific (Tokyo): https://cloudformation.ap-northeast-1.amazonaws.com/
- Canada West (Calgary): https://cloudformation.ca-west-1.amazonaws.com/
- Europe (Frankfurt): https://cloudformation.eu-central-1.amazonaws.com/
Documentation for the AutoDeployment parameter does reference "in the specified Regions", but I cannot see any way to specify those regions during stack set creation.
I do see that the UpdateStackSet API includes a Regions.member.N parameter, which allows for specifying the regions to deploy stacks to.
The region you see here refers to the region of the account to which the substack is deployed, not the region where the stackset is located.
The question is about regions where stacks within a stack set (substacks, as you call them) are deployed to, not about where the stack sets themselves are being deployed.

Thank you!