Skip to content

Commit

Permalink
Optimize pulling out aws-sdk dynamodb object.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Feb 15, 2024
1 parent b071f1f commit 9cfa5bb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/dynamoDbSafe.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
const { DynamoDB: DynamoDbOriginal, config } = require('aws-sdk');
const DynamoDbOriginal = require('aws-sdk/clients/dynamodb');

process.env.AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1;
require('http').globalAgent.keepAlive = true;
require('https').globalAgent.keepAlive = true;
config.update({ maxRetries: 5, httpOptions: { connectTimeout: 1000, timeout: 10000 } });

const DynamoDbError = require('./dynamoDbError');

Expand Down

0 comments on commit 9cfa5bb

Please sign in to comment.