我是新来的AWS Dynamodb. I 已读过 https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html我们可以设置M
dynamodb 模式中的属性值类型。
但是当我执行下面的代码时
var params = {
TableName: 'product',
KeySchema: [
{
AttributeName: 'productType',
KeyType: 'HASH'
},
{
AttributeName: 'manufacturer',
KeyType: 'SORT'
}
],
AttributeDefinitions: [
{
AttributeName: 'productType',
AttributeType: 'S'
},
{
AttributeName: 'manufacturer',
AttributeType: 'M'
}
],
ProvisionedThroughput: {
ReadCapacityUnits: 1,
WriteCapacityUnits: 1,
}
};
dynamodb.createTable(params, function(err, data) {
console.log(err, data);
});
它不断抛出错误{"message":"Member must satisfy enum value set: [B, N, S]","code":"ValidationException","time":"2018-02-07T11:20:12.930Z","statusCode":400,"retryable":false}
但上面的链接说有一个 Map 类型的属性可用。有人可以解释一下如何在 dynamo db 中实现 Map 吗?