我是一个AWS DynamoDB新手。我已经阅读,在DynamoDB的模式中可以设置属性值(attributeValue)的
但是当我执行以下代码时:
M
类型。但是当我执行以下代码时:
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吗?