Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Best practices for using AWS CloudFormation StackSets

Focus mode
Best practices for using AWS CloudFormation StackSets - AWS CloudFormation

This section describes the best practices for defining a stack set template, creating or adding stacks to a stack set, or updating a stack set.

If you are new to CloudFormation, review the AWS CloudFormation best practices topic for more recommendations that can help you use CloudFormation more effectively and securely.

Defining the template

  • Define the template that you want to standardize in multiple accounts, within multiple regions.

  • As you create the template, be sure that global resources (such as IAM roles and Amazon S3 buckets) do not have naming conflicts when they are created in more than one region in the same account.

  • A stack set has a single template and parameter set. The same stack is created in all accounts that are associated with a stack set. As you author your templates, make them granular enough to allow you a good balance of control and standardization.

  • We recommend that you store your template in an Amazon S3 bucket.

Creating or adding stacks to the stack set

  • Verify that adding stack instances to your initial stack set works before you add larger numbers of stack instances to your stack set.

  • Choose the deployment (rollout) options that work for your use case.

    • For a more conservative deployment, set Maximum Concurrent Accounts to 1, and Failure Tolerance to 0. Set your lowest-impact region to be first in the Region Order list. Start with one region.

    • For a faster deployment, increase the values of Maximum Concurrent Accounts and Failure Tolerance as needed.

  • Operations on stack sets depend on how many stack instances are involved, and can take significant time.

Updating stacks in a stack set

  • By default, updating a stack set updates all stack instances. If you have 20 accounts each in two regions, you will have 40 stack instances, and all will be updated when you update the stack set.

    For stack sets with a large number of stack instances, we recommend that to test the updated version of a template, you selectively update the stack instances in a few test accounts before updating all stack instances.

  • To get more granular control over updating individual stacks within your stack set, plan to create multiple stack sets.

  • Updating a stack set that contains a large number of stacks can take significant time. In this release, only one operation is permitted at a time on a stack set. Plan your updates so you are not blocked from performing other operations on the stack set.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.