From 841b13bae9140bd240bd1c623dc96b0b451004d3 Mon Sep 17 00:00:00 2001 From: Kiley Naro Date: Sat, 20 May 2017 17:34:05 -0400 Subject: [PATCH] Adds support for objectParams to be passed into the DynamoBackup class and through to the s3-streaming-upload for use by the aws.S3.ManagedUpload object. This enables a caller to specify aws request options such as ServerSideEncryption. --- lib/dynamo-backup.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/dynamo-backup.js b/lib/dynamo-backup.js index a81e469..beb5edc 100644 --- a/lib/dynamo-backup.js +++ b/lib/dynamo-backup.js @@ -22,6 +22,7 @@ function DynamoBackup(options) { this.stopOnFailure = options.stopOnFailure || false; this.base64Binary = options.base64Binary || false; this.saveDataPipelineFormat = options.saveDataPipelineFormat || false; + this.objectParams = options.objectParams || {}; this.awsAccessKey = options.awsAccessKey; this.awsSecretKey = options.awsSecretKey; this.awsRegion = options.awsRegion; @@ -65,6 +66,7 @@ DynamoBackup.prototype.backupTable = function (tableName, backupPath, callback) params.bucket = self.bucket; params.objectName = path.join(backupPath, tableName + '.json'); + params.objectParams = self.objectParams; params.stream = stream; params.debug = self.debug;