我有以下模板,我正在云编程UI中使用它来创建DynamoDB表。我想创建一个以ID为主键和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"
}
}
}
在CF UI上,我点击新建堆栈,指向来自本地计算机的template
文件,为堆栈命名并点击下一步。过一段时间后,我收到一个错误,错误信息是属性AttributeDefinitions与表和二级索引的KeySchema不一致