Dynamo - batchGet return empty

Viewed 323

I am trying to get records from a dynamo table based on a list of keys

What I have done :

In my js file (Node JS):

var AWS = require('aws-sdk');
var dynamoClient = new AWS.DynamoDB.DocumentClient();    
var params = {
    "RequestItems": {
        "table_01": {
            "Keys": [{
                "std_id": "A_H_61_15"
            }, {
                "std_id": "A_H_61_23"
            }, ...]
        }
    }
}

var dynamoBatchGetPromise = dynamoClient.batchGet(params).promise();
dynamoBatchGetPromise.then(function (data) {
   console.log("data resp: " + JSON.stringify(data));
});

Result: empty list ....???

{ "Responses": { "table_01": [] }, "UnprocessedKeys": {} }

I double checked the dynanmo table:

  • Primary partition key is corrected (std_id)
  • All keys existed in table

Any suggestion is appreciated.

0 Answers
Related