AWS::CloudFormation::MacroThe `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 [Perform custom processing on CloudFormation templates with template macros](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) in the *CloudFormation User Guide* .
import { CfnMacro } from 'aws-cdk-lib/aws-cloudformation';Or use the module namespace:
import * as cloudformation from 'aws-cdk-lib/aws-cloudformation';
// cloudformation.CfnMacroConfiguration passed to the constructor as CfnMacroProps.
functionNameRequiredstringThe Amazon Resource Name (ARN) of the underlying Lambda function that you want CloudFormation to invoke when the macro is run.
nameRequiredstringThe name of the macro. The name of the macro must be unique across all macros in the account.
descriptionOptionalstringA description of the macro.
logGroupNameOptionalstringThe CloudWatch Logs group to which CloudFormation sends error logging information when invoking the macro's underlying Lambda function. This will be an existing CloudWatch Logs LogGroup. Neither CloudFormation or Lambda will create the group.
logRoleArnOptionalstringThe ARN of the role CloudFormation should assume when sending log entries to CloudWatch Logs .
This L1 construct maps directly to the following CloudFormation resource type.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-cloudformationAWS::CloudFormation::Macro