Skip to content

Instantly share code, notes, and snippets.

@notionquest
Last active October 19, 2017 15:47
Show Gist options
  • Save notionquest/8f4b52b217a52b59330093750c84d3b7 to your computer and use it in GitHub Desktop.
Save notionquest/8f4b52b217a52b59330093750c84d3b7 to your computer and use it in GitHub Desktop.
Describe table present in dynamodb local
//Run the below script on http://localhost:8000/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("Describe table ...");
dynamodb.describeTable(params)
.on('complete', doPrint)
.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment