databaseamazon-web-servicesamazon-dynamodbdocumentclient

describe-table method using DocumentClient


How to do this request using DocumentClient?

aws dynamodb describe-table --table-name MusicCollection

Solution

  • Document client is for working with items, but assuming you mean how do you do it with Javascript, the answer is like this:

    https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html#describeTable-property

     var params = {
      TableName: "MusicCollection"
     };
     dynamodb.describeTable(params, function(err, data) {
       if (err) console.log(err, err.stack); // an error occurred
       else     console.log(data);           // successful response
     });