AWS CloudFormation
User Guide (Version )

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

AWS::CloudFormation::Macro

The AWS::CloudFormation::Macro resource is an CloudFormation resource type that creates an CloudFormation macro to perform custom processing on CloudFormation templates. For more information, see Using AWS CloudFormation Macros to Perform Custom Processing on Templates.

Syntax

To declare this entity in your AWS 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: String FunctionName: String LogGroupName: String LogRoleARN: String Name: 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 AWS Lambda function that you want AWS CloudFormation to invoke when the macro is run.

Required: Yes

Type: String

Update requires: No interruption

LogGroupName

The Amazon CloudWatch log group to which AWS CloudFormation sends error logging information when invoking the macro's underlying AWS Lambda function.

Required: No

Type: String

Update requires: No interruption

LogRoleARN

The ARN of the role AWS 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 Ref function, Ref returns the resource name. For example:

{ "Ref": "myMacro" }

For the macro myMacro, Ref returns the name of the macro.

For more information about using the Ref function, see Ref.

See Also