Skip to content

Commit aab3f2e

Browse files
authored
docs(triggers): add consideration about invocationType for the behavior of trigger failures (#26450)
TriggerCustomResourceProvider takes only the status code of Invoke API call into account. https://github.com/aws/aws-cdk/blob/7a6f953fe5a4d7e0ba5833f06596b132c95e0709/packages/aws-cdk-lib/triggers/lib/lambda/index.ts#L69-L73 If invocationType is `EVENT`, Lambda function is invoked asynchronously. In that case, if Lambda function is invoked successfully, the trigger will success regardless of the result for the function execution. I add this consideration into README. Closes #26341 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 5c09893 commit aab3f2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/aws-cdk-lib/triggers/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ deployment will fail, as if a resource failed to provision. This makes it easy
5757
to implement "self tests" via triggers by simply making a set of assertions on
5858
some provisioned infrastructure.
5959

60+
Note that this behavior is only applied when invocationType is `REQUEST_RESPONSE`. When invocationType is `EVENT`, Lambda function is invoked asynchronously.
61+
In that case, if Lambda function is invoked successfully, the trigger will success regardless of the result for the function execution.
62+
6063
## Order of Execution
6164

6265
By default, a trigger will be executed by CloudFormation after the associated

0 commit comments

Comments
 (0)