Skip to content

Commit

Permalink
docs(triggers): add consideration about invocationType for the behavi…
Browse files Browse the repository at this point in the history
…or 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*
  • Loading branch information
tam0ri authored Jul 20, 2023
1 parent 5c09893 commit aab3f2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/aws-cdk-lib/triggers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ deployment will fail, as if a resource failed to provision. This makes it easy
to implement "self tests" via triggers by simply making a set of assertions on
some provisioned infrastructure.

Note that this behavior is only applied when invocationType is `REQUEST_RESPONSE`. When 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.

## Order of Execution

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

0 comments on commit aab3f2e

Please sign in to comment.