Skip to content

Instantly share code, notes, and snippets.

@notionquest
Created October 6, 2017 11:21
Show Gist options
  • Save notionquest/8832bb0f59b56a07f79d6fab27384866 to your computer and use it in GitHub Desktop.
Save notionquest/8832bb0f59b56a07f79d6fab27384866 to your computer and use it in GitHub Desktop.
//Run the below script on http://localhost:8000/shell/
var dynamodb = new AWS.DynamoDB({
region: 'us-east-1',
endpoint: "http://localhost:8000"
});
var params = {
};
function doPrint(response) {
if (response.error) ppJson(response.error); // an error occurred
else {
ppJson(response.data); // successful response
}
}
console.log("List of tables");
dynamodb.listTables(params)
.on('complete', doPrint)
.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment