Skip to content

Commit fa44231

Browse files
committed
v3: Add a comment about retry (motdotla#758)
1 parent 073798c commit fa44231

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

lib/main.js

Lines changed: 8 additions & 2 deletions
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)