Skip to content
Open
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
6 changes: 6 additions & 0 deletions lib/dynamo-restore.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ function DynamoRestore(options) {

this.options = options;
this.dynamodb = new AWS.DynamoDB();

this.batches = []; // Initialize batches as an empty array
this.requestItems = []; // Initialize requestItems as an empty array
}

// Stick to prototypal inheritance. While this can be done differently
Expand Down Expand Up @@ -122,6 +125,9 @@ DynamoRestore.prototype._checkTableExists = function(error, data) {
};

DynamoRestore.prototype._startDownload = function() {
this.batches = this.batches || [];
this.requestItems = this.requestItems || [];

var s3 = new AWS.S3();
var params = {
Bucket: this.options.s3bucket,
Expand Down