Skip to content

Instantly share code, notes, and snippets.

@sbower

sbower/block1.js Secret

Created March 8, 2017 21:26
Show Gist options
  • Save sbower/8e7554b007c39127c4b99b569b640ee0 to your computer and use it in GitHub Desktop.
Save sbower/8e7554b007c39127c4b99b569b640ee0 to your computer and use it in GitHub Desktop.
// describe the table and write metadata to the backup
dynamo.describeTable({TableName: tablename}, function(err, data) {
if (err) console.log(err, err.stack);
else {
table = data.Table
// Write table metadata to first line
data_stream.append(JSON.stringify(table));
data_stream.append("\n");
// limit the the number or reads to match our capacity
params.Limit = table.ProvisionedThroughput.ReadCapacityUnits
// start streaminf table data
dynamo.scan(params, onScan);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment