AWS News Blog

Parallel Stack Processing and Nested Stack Updates for AWS CloudFormation

My colleague Chetan Dandekar brings word of two powerful enhancements to AWS CloudFormation!

— Jeff;


AWS CloudFormation gives developers and systems administrators an easy way to create and manage a collection of related AWS resources, provisioning and updating them in an orderly and predictable fashion by using custom or predefined templates.

Today, we introduce two significant enhancements to AWS CloudFormation: parallel stack processing and nested stack updates. 

Parallel Stack Processing
CloudFormation now creates, updates, and deletes resources in parallel in order to improve performance of these operations. For example, provisioning a RAID 0 setup, which involves the creation of multiple EBS volumes, is now faster because CloudFormation can provision the volumes in parallel. CloudFormation automatically determines which resources in a template can be created in parallel. CloudFormation template authors can use the DependsOn attribute for control over the order of resource creation.

Nested Stack Updates
CloudFormation allows nesting a stack as a resource inside a template. Today, we are introducing the ability to update a top-level stack and nested stacks together. Nested stack updates can be triggered by running the UpdateStack command on a top-level stack, or by selecting the top-level stack and clicking “Update Stack” in the CloudFormation Management Console. CloudFormation will detect the updates made to the top-level template as well as to the nested templates and update only those stacks whose templates have changed. Before introduction of this feature, users had to update each nested stack separately.

Lets look at an example. A three-tier application is defined in a top-level template that has web tier, app tier, and database tier as nested stacks. Using CloudFormation, the top level stack and the nested stacks are created together and in the correct order. After the stacks are created, we want to add a new IAM user to the top-level stack and CloudWatch alarms to the web tier and the app tier. With the introduction of nested stack updates, we can update the top level stack, the web tier stack, and the app tier stack together and in the correct order.  The stack for the database tier, which has no changes, would not be updated. Before introduction of nested stack updates, we would have had to update each of the nested stacks individually.

Here are some simple visualizations to show you the degree of parallelism that becomes possible with this update (each line represents a separate AWS resource; time progresses to the right).


To learn more about CloudFormation, visit the CloudFormation homepage, documentation, and watch this introductory video.  Our large collection of sample templates makes it easy to try our service within minutes.

Chetan Dandekar, Senior Product Manager

 

Jeff Barr

Jeff Barr

Jeff Barr is Chief Evangelist for AWS. He started this blog in 2004 and has been writing posts just about non-stop ever since.