4
我想通过aws-sdk on nodejs在dynamodb上创建一个表。 下面是我传递dynamodb.createTable参数:Nodejs DynamoDB CreateTable哈希只有没有范围返回ValidationException
{
TableName: 'new_table',
ProvisionedThroughput: {
ReadCapacityUnits: 1,
WriteCapacityUnits: 1
},
KeySchema: [
{AttributeName: 'primary_key', KeyType: 'HASH'}
],
AttributeDefinitions: [
{AttributeName: 'primary_key', AttributeType: 'S'},
{AttributeName: 'some_attribute', AttributeType: 'S'}
]
}
这将返回
ValidationException: One or more parameter values were invalid: Number of attributes in KeySchema does not exactly match number of attributes defined in AttributeDefinitions
我已经解决了这个问题通过增加“some_attribute”上“KeySchema”,但我想要的是一个“哈希'只有桌子没有'范围'。
谢谢。我也偶然发现了同样的问题。 – YOMorales 2014-12-05 22:10:00