4
dynamodb의 테이블을 aws-sdk on nodejs에 만들려고합니다. 는 '해시'KeySchema '하지만 내가 원하는에'some_attribute '를 추가하여범위가없는 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
내가이 문제를 해결 한 반환 : 다음은 내가 dynamodb.createTable에 전달하고있는 매개 변수입니다 '범위'가없는 테이블 만.
고마워요. 나는 또한 같은 문제에 비틀 거렸다. – YOMorales