Skip to content

Instantly share code, notes, and snippets.

@notionquest
Created June 1, 2018 12:53
Show Gist options
  • Save notionquest/ca4ed8bd638bdbad5d7432f4b04f8a12 to your computer and use it in GitHub Desktop.
Save notionquest/ca4ed8bd638bdbad5d7432f4b04f8a12 to your computer and use it in GitHub Desktop.
dynamodb scan table local in shell
var dynamodb = new AWS.DynamoDB({
region: 'us-east-1',
endpoint: "http://localhost:8000"
});
var params = {
TableName: "Movies",
};
function doPrint(response) {
if (response.error) ppJson(response.error); // an error occurred
else {
ppJson(response.data); // successful response
}
}
console.log("List of tables");
dynamodb.scan(params)
.on('complete', doPrint)
.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment