s3: remove retry options for exists check

This commit is contained in:
Girish Ramakrishnan
2021-03-04 23:40:23 -08:00
parent 83872a0a1d
commit 4275114d28

View File

@@ -65,7 +65,7 @@ function getS3Config(apiConfig, callback) {
region: apiConfig.region || 'us-east-1',
maxRetries: 10,
retryDelayOptions: {
customBackoff: () => 20000 // constant backoff - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#retryDelayOptions-property
customBackoff: (/* retryCount, error */) => 20000 // constant backoff - https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#retryDelayOptions-property
},
httpOptions: {
connectTimeout: 60000, // https://github.com/aws/aws-sdk-js/pull/1446
@@ -146,7 +146,7 @@ function exists(apiConfig, backupFilePath, callback) {
getS3Config(apiConfig, function (error, credentials) {
if (error) return callback(error);
const s3 = new AWS.S3(credentials);
const s3 = new AWS.S3(_.omit(credentials, 'retryDelayOptions', 'maxRetries'));
if (!backupFilePath.endsWith('/')) { // check for file
const params = {