我正在尝试使用nodejs sdk 在 Dynamo 表上放置一个项目。我尝试使用相同的文档和一些其他变体,但似乎没有任何效果。每次我收到同样的错误:
"message":"Invalid attribute value type"
"code":"ValidationException"
"time":"2016-10-11T06:32:26.361Z"
"statusCode":400
"retryable":false
Run Code Online (Sandbox Code Playgroud)
以下是相关代码片段:
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
});
Run Code Online (Sandbox Code Playgroud)
我的表的索引如下:
主要:分区键:stringAtt,排序键:boolAtt
GSI:分区键:boolAtt,排序键:numAtt
我不确定是我的查询错误还是索引结构错误。