我正在尝试从 DynamoDB 表中删除数据。
如果我使用分区键删除数据,它会起作用。
但是当我使用任何其他字段删除多行时,它会失败。
var params = {
TableName: "test",
Key: {
dmac: dmac,
},
ConditionExpression: "dmac= :dmac"
};
docClient.delete( params, (error) => {
if (error) {
console.log( "Delete data fail" );
} else {
console.log( "Delete data Success" );
}
});
Run Code Online (Sandbox Code Playgroud) amazon-web-services node.js amazon-dynamodb dynamodb-queries