I am trying to do a put item on a Dynamo Table using the nodejs sdk. I tried using the same document and a few other variations but nothing seems to work. Everytime I receive the same error:
"message":"Invalid attribute value type"
"code":"ValidationException"
"time":"2016-10-11T06:32:26.361Z"
"statusCode":400
"retryable":false
The following is the relevant code snippet:
var params = {
TableName: "MY_Table_Name",
Item: {
"stringAtt": "stringValue",
"boolAtt": true,
"numAtt": 123,
},
};
docClient.put(params, function(err, data) {
if (err) ppJson(err); // an error occurred
else ppJson(data); // successful response
});
My table's indexes are as follows:
Primary: Partition Key: stringAtt, Sort Key: boolAtt
GSI: Partition Key: boolAtt, Sort Key: numAtt
I am not sure if it's my query or the index structure that is wrong.