Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.
2.2.1.5. Applying CloudFormation StackSets Across Multiple Accounts and AWS Regions
2.2.1.5. Applying CloudFormation StackSets Across Multiple Accounts and Regions
StackSets deploy a single CloudFormation template to multiple AWS accounts and regions simultaneously — enforcing organizational standards at scale.
How StackSets work:
- Administrator account creates a StackSet with a template
- StackSet creates stack instances in target accounts/regions
- Each stack instance is a normal CloudFormation stack in the target account
- Updates to the StackSet propagate to all stack instances
Deployment options:
- Self-managed permissions: Create IAM roles manually in each account. More control, more setup.
- Service-managed permissions: Uses AWS Organizations. Supports automatic deployment to new accounts added to an OU.
# Deploy a security baseline to all accounts in the Security OU
aws cloudformation create-stack-set \
--stack-set-name SecurityBaseline \
--template-url https://s3.amazonaws.com/templates/security.yml \
--permission-model SERVICE_MANAGED \
--auto-deployment Enabled=true,RetainStacksOnAccountRemoval=false
Operational controls:
MaxConcurrentPercentage: Percentage of accounts updated simultaneously (e.g., 25%)FailureTolerancePercentage: How many accounts can fail before the operation stopsRegionConcurrencyType:SEQUENTIAL(one region at a time) orPARALLEL
Exam Trap: StackSets with service-managed permissions require EnableAllFeatures in Organizations — not just consolidated billing. Also, the management account itself is not automatically included as a target — you must explicitly add it.
Enroll to unlock the 2 practice questions written for this section, so you can test what you just read while it is fresh.
Enroll to unlock the 2 flashcards for this section and review them on a spaced-repetition schedule.
Written byAlvin Varughese
Founder•18 professional certifications