aws-stepfunctions-tasks: Default Retry policy for LambdaInvoke does not include "Lambda.ClientExecutionTimeoutException" #26470
Labels
@aws-cdk/aws-stepfunctions-tasks
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
When using
new LambdaInvoke()
without disablingretryOnServiceExceptions
, then the automatically created Retry configuration does not include the Lambda.ClientExecutionTimeoutException error type.Expected Behavior
Default Retry configuration created by
new LambdaInvoke()
should include the "Lambda.ClientExecutionTimeoutException" error type [in addition to the 3 error types that are already in there] following the most recent recommendation in AWS Step Functions / Handle Lambda service exceptions.Current Behavior
Default Retry configuration created by
new LambdaInvoke()
contains the following 3 error types: "Lambda.ServiceException", "Lambda.AWSLambdaException", "Lambda.SdkClientException" - which appears to follow an older version of the recommendation in AWS Step Functions / Handle Lambda service exceptions.Reproduction Steps
new LambdaInvoke()
constructor without defining theretryOnServiceExceptions
input parameter (i.e. leaving its default oftrue
intact).Possible Solution
Add
'Lambda.ClientExecutionTimeoutException'
to theerrors
array defined on this line of theLambdaInvoke
constructor inaws-cdk-lib/aws-stepfunctions-tasks/lib/lambda/invoke.ts
.Additional Information/Context
While the AWS CDK documentation section describing the
retryOnServiceExceptions
constructor parameter ofLambdaInvoke
(link) mentions explicitly only the 3 particular error types covered by the default Retry configuration at this time, that same section also references the AWS Step Functions / Handle Lambda service exceptions documentation that recommends including the Lambda.ClientExecutionTimeoutException error in that Retry configuration as well.My best guess is that the inclusion of the Lambda.ClientExecutionTimeoutException error into the above recommendation fairly recent (I have a strong feeling it was not there couple months ago) and did not yet make its way to AWS CDK.
CDK CLI Version
3.87.0 (build 9fca790)
Framework Version
No response
Node.js Version
14.x
OS
Amazon Linux 2
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: