9
Scale Your Templates Using Macros, Nested Stacks, and Modules
Sometimes, when we work with templates, we want to dynamically assign values to resources or alter the template quickly during stack operations. Sometimes, we want to have a modular structure for our stacks and enhance reusability.
One of the most well-known template macros is the Serverless Application Model (SAM), which is a simplified CloudFormation template for serverless applications (we will cover SAM in the next few chapters). Another well-known macro is AWS::Include, which allows us to append the CloudFormation template with boilerplate snippets. When it comes to reusability and modularity, we can use nested stacks or register CloudFormation module extensions.
In this chapter, ...
Get Mastering AWS CloudFormation - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.