AWS CloudFormation Hooks now support custom AWS Lambda functions
AWS CloudFormation Hooks introduces a pre-built hook that allows you to simply point to an AWS Lambda function in your account. With CloudFormation Hooks, you can provide custom logic that proactively evaluate your resource configurations before provisioning. Today’s launch allows you to provide your custom logic as a Lambda function, allowing a simpler way for you to author a hook while gaining extended flexibility of hosting Lambda functions in your account.
Prior to this launch, customers used the CloudFormation CLI (cfn-cli) to author and publish hooks to the CloudFormation registry. Now, customers can simply activate the Lambda hook and pass a Lambda Amazon Resource Names (ARNs) for hooks to invoke. This allows you to directly edit your Lambda function to make updates without re-configuring your hook. Additionally, you no longer have to register your custom logic to CloudFormation registry.
The Lambda hook is available at no additional charge in all AWS Commercial Regions. Customers will incur a charge for Lambda usage. Refer to Lambda’s pricing guide for more information. To get started, you can use the new Hooks console workflow within CloudFormation console, AWS CLI, or CloudFormation.
To learn more about the Lambda hook, check out the detailed feature walkthrough on the AWS DevOps Blog or refer to the Lambda Hook User Guide. To get started with creating your Lambda function, visit AWS Lambda User Guide.