AWS::CloudFormation::Macro
The AWS::CloudFormation::Macro resource is a CloudFormation resource type that creates a
CloudFormation macro to perform custom processing on CloudFormation templates. For more
information, see Using
Amazon CloudFormation macros to perform custom processing on templates.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::CloudFormation::Macro", "Properties" : { "Description" :String, "FunctionName" :String, "LogGroupName" :String, "LogRoleARN" :String, "Name" :String} }
YAML
Type: AWS::CloudFormation::Macro Properties: Description:StringFunctionName:StringLogGroupName:StringLogRoleARN:StringName:String
Properties
Description-
A description of the macro.
Required: No
Type: String
Update requires: No interruption
FunctionName-
The Amazon Resource Name (ARN) of the underlying Amazon Lambda function that you want Amazon CloudFormation to invoke when the macro is run.
Required: Yes
Type: String
Update requires: No interruption
LogGroupName-
The CloudWatch Logs group to which Amazon CloudFormation sends error logging information when invoking the macro's underlying Amazon Lambda function.
Required: No
Type: String
Update requires: No interruption
LogRoleARN-
The ARN of the role Amazon CloudFormation should assume when sending log entries to CloudWatch Logs.
Required: No
Type: String
Update requires: No interruption
Name-
The name of the macro. The name of the macro must be unique across all macros in the account.
Required: Yes
Type: String
Update requires: Replacement
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the resource name. For example:
{ "Ref": "myMacro" }
For the macro myMacro, Ref returns the name of the macro.
For more information about using the Reffunction, see Ref.