I am using Node.js
var AWS = require('aws-sdk');
AWS.config.update({
region: "region",
endpoint: "https://dynamodb.region.amazonaws.com"
});
var dynamodb = new AWS.DynamoDB();
var params = {
TableName: "acc_new"
};
dynamodb.describeTable(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(JSON.stringify(data));
});
Output :
{ AttributeDefinitions: [ { AttributeName: 'Id', AttributeType: 'S' } ],
TableName: 'acc_new',
KeySchema: [ { AttributeName: 'Id', KeyType: 'HASH' } ],
ProvisionedThroughput: { ReadCapacityUnits: 5, WriteCapacityUnits: 5 } }
output consist of only key schemas(hash and range keys only) associated with the table, Not all the attributes. I want to fetch all attributes associated with data in the table.
Like:
{ AttributeName: 'AccountName', AttributeType: 'S' }
{ AttributeName: 'CreatedBy', AttributeType: 'S' }
...
...
Is there any way to get descriptions of a dynamoDb table with all of its data fields.