File tree Expand file tree Collapse file tree
java/com/networknt/aws/lambda Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,8 +62,12 @@ public LambdaFunctionHandler() {
6262 if (config .getMaxRetries () > 0 ) {
6363 overrideConfig = overrideConfig .toBuilder ()
6464 .retryStrategy (DefaultRetryStrategy .standardStrategyBuilder ()
65- .maxAttempts (config .getMaxRetries ())
66- .build ())
65+ .maxAttempts (config .getMaxRetries () + 1 ) // +1 because the first attempt is not counted as a retry
66+ .build ())
67+ .build ();
68+ } else {
69+ overrideConfig = overrideConfig .toBuilder ()
70+ .retryStrategy (DefaultRetryStrategy .doNotRetry ())
6771 .build ();
6872 }
6973
Original file line number Diff line number Diff line change @@ -7,8 +7,9 @@ endpointOverride: ${lambda-invoker.endpointOverride:}
77apiCallTimeout : ${lambda-invoker.apiCallTimeout:60000}
88# Api call attempt timeout in milliseconds. This sets the amount of time for each individual attempt.
99apiCallAttemptTimeout : ${lambda-invoker.apiCallAttemptTimeout:20000}
10- # The maximum number of retries for the Lambda function invocation. Default is 3. Set to 0 to disable retries.
11- maxRetries : ${lambda-invoker.maxRetries:3}
10+ # The maximum number of retries for the Lambda function invocation. Default is 2, which equals to 3 max attempts.
11+ # Set to 0 to disable retries so that the Lambda function is invoked only once.
12+ maxRetries : ${lambda-invoker.maxRetries:2}
1213# The maximum number of concurrent requests that can be made to Lambda. Default is 50.
1314maxConcurrency : ${lambda-invoker.maxConcurrency:50}
1415# The maximum number of pending acquires allowed. Default is 10000.
You can’t perform that action at this time.
0 commit comments