aws-cloudformation-macros
aws-cloudformation-macros copied to clipboard
This repository hosts examples of AWS CloudFormation macros.
AWS CloudFormation Macros
NOTE that this repository is being archived in favor of similar content located here:
https://github.com/aws-cloudformation/aws-cloudformation-templates/tree/main/aws/services/CloudFormation/MacrosExamples
This repository hosts examples of AWS CloudFormation macros.
Contents
-
Boto3
The
Boto3macro adds the ability to create CloudFormation resources that represent operations performed by boto3. EachBoto3resource represents one function call. -
Count
The
Countmacro provides a template-wideCountproperty for CloudFormation resources. It allows you to specify multiple resources of the same type without having to cut and paste. -
ExecutionRoleBuilder
The
Execution Role Buildermacro provides a more natural syntax for developers to express the permissions they want to attach to IAM execution roles for their applications, while simultaneously providing IAM administrators with a way to templatize those permissions. When used in conjunction with permission boundaries, this provides an effective solution for delegated role creation. -
Explode
The
Explodemacro provides a template-wideExplodeproperty for CloudFormation resources. Similar to the Count macro, it will create multiple copies of a template Resource, but looks up values to inject into each copy in a Mapping. -
Public-and-Private-Subnet-per-AZ
This is a Cloudformation Macro used to dynamically add a public and private subnet per Availability Zone when launching a template. When the CreateStack template is launched and a change set is created, the Macro (named 'CreateSubnetsPerAZ') will dynamically add resources to the template for a public and private subnet per available AZ
-
PyPlate
Run arbitrary python code in your CloudFormation templates
-
S3Objects
The
S3Objectsmacro adds a new resource type:AWS::S3::Objectwhich you can use to populate an S3 bucket. -
ShortHand
The
ShortHandmacro provides convenience syntax to allow you to create short CloudFormation templates that expand into larger documents upon deployment to a stack. -
StackMetrics
When the
StackMetricsmacro is used in a CloudFormation template, any CloudFormation stack deployed from that template will output custom CloudWatch metrics for the stack. -
StringFunctions
Provides string transformation utility functions.
License
This library is licensed under the Apache 2.0 License.