我需要使用相应的键将字符串附加到dynamodb表中的字符串集.这是我用来执行updateItem的Update表达式:
var params = {
"TableName" : tableName,
"Key": {
"ID": {
S: "20000"
}
},
"UpdateExpression" : "SET #attrName = list_append(#attrName, :attrValue)",
"ExpressionAttributeNames" : {
"#attrName" : "entries"
},
"ExpressionAttributeValues" : {
":attrValue" : {"SS":["000989"]}
} };
Run Code Online (Sandbox Code Playgroud)
这在我使用aws cli执行updateItem()时有效.但是当在nodejs中使用aws-sdk时,我收到错误:
Invalid UpdateExpression: Incorrect operand type for operator or function; operator or function: list_append, operand type: M\n
Run Code Online (Sandbox Code Playgroud)
有帮助吗?谢谢