I have following template that i am using in cloudformation UI to create dynamoDB table. I want to create a table with PrimaryKey as ID and sortKey as Value
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "DB Description",
"Resources" : {
"TableName" : {
"Type" : "AWS::DynamoDB::Table",
"Properties" : {
"AttributeDefinitions": [ {
"AttributeName" : "ID",
"AttributeType" : "S"
}, {
"AttributeName" : "Value",
"AttributeType" : "S"
} ],
"KeySchema": [
{
"AttributeName": "ID",
"KeyType": "HASH"
}
]
},
"TableName": "TableName"
}
}
}
On the CF UI, I click on new stack, point to the template
file from my local computer, give stack a name and click next. After sometime, I get error that says Property AttributeDefinitions is inconsistent with the KeySchema of the table and the secondary indexes