Skip to content

Instantly share code, notes, and snippets.

@ox1111
Created February 12, 2019 06:44
Show Gist options
  • Save ox1111/7f5853ffe1fa85b563c0d0def96b414d to your computer and use it in GitHub Desktop.
Save ox1111/7f5853ffe1fa85b563c0d0def96b414d to your computer and use it in GitHub Desktop.
var aws = require('aws-sdk');
aws.config.update({region: 'us-west-2'});
// Create the DynamoDB service object
var ddb = new aws.DynamoDB({apiVersion: '2019-02-12'});
// Call DynamoDB to retrieve the list of tables
ddb.listTables({Limit: 10}, function(err, data) {
if (err) {
console.log("Error", err.code);
} else {
console.log("Table names are ", data.TableNames);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment