【发布时间】:2023-01-23 17:58:57
【问题描述】:
从 Node Js 在 dynamoDB 中创建表时。我收到上述错误。
const schema = {
TableName: "alarms",
KeySchema: [
{ AttributeName: "alarm_code", KeyType: "HASH" }, //Partition key
{ AttributeName: "controller", KeyType: "RANGE" } //Sort key
],
AttributeDefinitions: [
{ AttributeName: "alarm_code", AttributeType: "N" },
{ AttributeName: "controller", AttributeType: "S" },
{ AttributeName: "controller_type", AttributeType: "S" }
],
ProvisionedThroughput: {
ReadCapacityUnits: 10,
WriteCapacityUnits: 10
}
}
{ AttributeName: "controller_type", AttributeType: "S" }
将此属性添加到 AttributeDefinitions 我收到上述错误
【问题讨论】: