AWS CloudFormation Supports AWS Lambda-Backed Custom Resources

Posted on: Apr 8, 2015

You can now use AWS Lambda-backed custom resources for your AWS CloudFormation stacks. CloudFormation simplifies the provisioning of a wide range of AWS resources, and also supports ‘custom resources’, which is an extensibility mechanism that enables you to write custom provisioning logic and have it execute during a CloudFormation stack operation (e.g., creating a stack). You can write custom provisioning logic for tasks such as provisioning a third party resource or looking up the latest AMI IDs for use in your stacks.

With Lambda-backed custom resources, you can now use AWS Lambda to write the custom provisioning logic and have it called during CloudFormation stack creates, updates, or deletes. This greatly simplifies implementing and using custom resources for use cases such as dynamically looking up AMI IDs, referencing resources in other stacks, or implementing utility functions (e.g., an IP address reversal function).

To get started, please follow our walkthrough on using AWS Lambda as a custom resource. For more information on how to use AWS Lambda, please see the AWS Lambda Developer Guide.

For more information on AWS CloudFormation: