@@ -3,12 +3,12 @@ title: Custom Resources description: Utility
33---
44
55[ Custom resources] ( https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html )
6- provide a way for [ AWS lambdas ] (
6+ provide a way for [ AWS Lambda functions ] (
77https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources-lambda.html ) to execute
88provisioning logic whenever CloudFormation stacks are created, updated, or deleted. The CloudFormation utility enables
9- developers to write these lambdas in Java.
9+ developers to write these Lambda functions in Java.
1010
11- The utility provides a base ` AbstractCustomResourceHandler ` class that listens for [ custom resource request events] (
11+ The utility provides a base ` AbstractCustomResourceHandler ` class which handles [ custom resource request events] (
1212https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-requests.html ), constructs
1313[ custom resource responses] ( https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/crpg-ref-responses.html ) , and
1414sends them to the custom resources. Subclasses implement the provisioning logic and configure certain properties of
@@ -43,8 +43,8 @@ To install this utility, add the following dependency to your project.
4343Create a new ` AbstractCustomResourceHandler ` subclass and implement the ` create ` , ` update ` , and ` delete ` methods with
4444provisioning logic in the appropriate methods(s).
4545
46- As an example, if a lambda only needs to provision something when a stack is created, put the provisioning logic
47- exclusively within the ` create ` method; the other methods can just return ` null ` .
46+ As an example, if a Lambda function only needs to provision something when a stack is created, put the provisioning
47+ logic exclusively within the ` create ` method; the other methods can just return ` null ` .
4848
4949``` java hl_lines="8 9 10 11"
5050import com.amazonaws.services.lambda.runtime.Context ;
@@ -82,8 +82,8 @@ If provisioning fails, the stack creation/modification/deletion as a whole can b
8282When provisioning results in data to be shared with other parts of the stack, include this data within the returned
8383` Response ` instance.
8484
85- This lambda creates a [ Chime AppInstance] ( https://docs.aws.amazon.com/chime/latest/dg/create-app-instance.html ) and maps
86- the returned ARN to a "ChimeAppInstanceArn" attribute.
85+ This Lambda function creates a [ Chime AppInstance] ( https://docs.aws.amazon.com/chime/latest/dg/create-app-instance.html )
86+ and maps the returned ARN to a "ChimeAppInstanceArn" attribute.
8787
8888``` java hl_lines="11 12 13 14"
8989public class ChimeAppInstanceHandler extends AbstractCustomResourceHandler {
@@ -104,8 +104,7 @@ public class ChimeAppInstanceHandler extends AbstractCustomResourceHandler {
104104}
105105```
106106
107- Assuming the method executes successfully, the handler will send a response to the custom resource with a payload that
108- looks something like the following:
107+ For the example above the following response payload will be sent.
109108
110109``` json
111110{
0 commit comments