2

How to do this request using DocumentClient?

aws dynamodb describe-table --table-name MusicCollection
Dmitry Grinko
  • 13,806
  • 14
  • 62
  • 86

1 Answers1

2

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
 });
F_SO_K
  • 13,640
  • 5
  • 54
  • 83
  • You are right. Looks like I should create two variables in my lambda function - var documentClient = new AWS.DynamoDB.DocumentClient(); var dynamodb = new AWS.DynamoDB(); – Dmitry Grinko Apr 28 '18 at 21:33