Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ const CloudWatchLogs = require(path.join(__dirname, 'cloudwatch_logs'))
const AWSXRay = require('aws-xray-sdk-core')
const { createNamespace } = require('continuation-local-storage')

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

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

_uploadNew (lambda, params) {
if (process.env.USE_AWS_SDK_V3) {
// todo retry
console.log('DEBUG: Use AWS SDK V3: CreateFunctionCommand()')
const command = new CreateFunctionCommand(params)
return lambdaClient.send(command)
Expand Down