FoxuTech

How to Create CloudFormation StactSet – CloudFormation Tutorial – Part 8

How to Create CloudFormation StactSet

A StackSet is a set of CloudFormation stacks that can easily be deployed to multiple AWS accounts and/or multiple AWS regions. Before, each stack had to be deployed separately and custom scripts were required to orchestrate deploying to multiple accounts/regions. Therefore, this feature is bound to make the lives of AWS administrators a bit easier.

There are loads of use cases for deploying stacks to multiple locations. For example, it’s considered a best practice to enable AWS Config in every region. This service keeps track of resources in an AWS account and changes to those resources. AWS Config needs to be enabled in every region separately, so a CloudFormation stack is required for every region.

Another use case is sandbox account. If you have a set of sandbox accounts for software engineers in your company, you want to keep these accounts in the same state. Instead of provision CloudFormation stacks in every account separately, you can now use a single StackSet to provision all accounts with a single API call.

The feature announcement from AWS already included for how to set this up through the AWS Console. Us AWS pros of course want to provision our accounts automatically, so let’s see how we can use the newly added AWS CLI methods to provision a StackSet in multiple regions.

You can create a stack set in either the AWS Management Console, or by using AWS CloudFormation commands in the AWS CLI.

To create a stack set by using the AWS Management Console

  • In the Delivery Channel Configuration area, you can configure the delivery channel for updates and notifications. To know about the parameters, refer Managing the Delivery Channel
  • In the Delivery Notifications area, you can configure Amazon Simple Notification Service (SNS) updates by email, based on log content.
  • When you are finished specifying parameters for AWS Config, choose Next.
  1. In the Accounts area, choose Deploy stacks in accounts. Paste your target account numbers in the text box, separating multiple numbers with commas.
  2. In the Regions area, choose US West (Oregon) Region and then choose Add. Repeat for the US East (N. Virginia) Region. US West (Oregon) Region should be first in the Deployment order box.
  3. In the Preferences area, keep the default value of 1 and By number for Maximum concurrent accounts. This means that AWS CloudFormation deploys your stack in only one account at one time. Keep Failure tolerance at the default value of 0, and keep the By number default option. This means that a maximum of one stack deployment can fail in one of your specified regions before AWS CloudFormation stops deployment in the current region, and cancels deployment in remaining regions. Choose Next.

Note: For more information about potentially required permissions, see Acknowledging IAM Resources in AWS CloudFormation Templates in this guide.

Conclusion

CloudFormation StackSets is certainly a welcome new feature that will make the lives for AWS administrators easier. Of course, this is just the first version of this great new functionality. I’m hoping the following limitations are already somewhere on the roadmap to be addressed:

Read More: AWS CloudFormation Tutorial

Exit mobile version