LambdaBackedCustomResource

Description

Creates a lambda function and associate it with CloudFormation custom resource. The function is invoked whenever the custom resource is created, updated, or deleted. See AWS Lambda-backed custom resources for more information.

Resources

AWS::CloudFormation::CustomResource

Custom resource associated with the custom provisioning logic that CloudFormation will run during stack operations (Create, Update, and Delete).

AWS::Lambda::Function

There must be a circuit panel with the same name as the user id of this resource which defines the logic of a lambda function.

AWS::IAM::Role

Lambda function execution role

Least-privilege IAM policy statements required for executing a lambda function are automatically included in the IAM role by Coreograph.

Input

Nonce

CloudFormation will not execute the custom resource if no properties are changed. This parameter is used to ensure that CloudFormation runs the custom resource when the value of this parameter changes from the last stack creation or update.

You can specify any valid Cloudformation syntax that resolves to a string or Coreograph pseudo parameters (See Coreograph pseudo parameters for more information).

Common value of this parameter are:

Resource logical ID. If you use resource logical ID as nonce, the custom resource runs every time the user ID of that resource changes.

${Coreograph::DeploymentUUID} If you use this Coreograph pseudo parameter as nonce, the custom resource runs every time the Coreograph project is compiled.

${Coreograph::RootHash::RootName} If you use this Coreograph pseudo parameter as nonce, the custom resource runs every time the logic (transpiled code) of the function resource AWS::Lambda::Function, AWS::ECS::TaskDefinition, or AWS::Serverless::Function) whose user id is specified by the RootName is modified.

Output

LambdaFunction

Logical ID of CloudFormation custom resource AWS::CloudFormation::CustomResource created by this pattern.