Skip to content

Commit 92d07cc

Browse files
authored
v3: Add a comment about retry (#758)
1 parent d6a5439 commit 92d07cc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/main.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@ const CloudWatchLogs = require(path.join(__dirname, 'cloudwatch_logs'))
1919
const AWSXRay = require('aws-xray-sdk-core')
2020
const { createNamespace } = require('continuation-local-storage')
2121

22-
// Migrating to v3.
22+
/*
23+
* Migrating to v3.
24+
*
25+
* # About retry
26+
* By default, each client already has a default retry strategy.
27+
* The default retry count is 3, and only retryable errors will be retried.
28+
* https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html
29+
*/
2330
const { LambdaClient, CreateFunctionCommand } = require('@aws-sdk/client-lambda')
2431
const lambdaClient = new LambdaClient()
2532

@@ -693,7 +700,6 @@ Emulate only the body of the API Gateway event.
693700

694701
_uploadNew (lambda, params) {
695702
if (process.env.USE_AWS_SDK_V3) {
696-
// todo retry
697703
console.log('DEBUG: Use AWS SDK V3: CreateFunctionCommand()')
698704
const command = new CreateFunctionCommand(params)
699705
return lambdaClient.send(command)

0 commit comments

Comments
 (0)