这是我对流层生成的JSON(DynamoDB的一部分):
"sandbox": {
"Properties": {
"AttributeDefinitions": [
{
"AttributeName": "audit_id",
"AttributeType": "S"
},
{
"AttributeName": "status",
"AttributeType": "S"
},
{
"AttributeName": "filename",
"AttributeType": "S"
},
{
"AttributeName": "file_detected_dt",
"AttributeType": "S"
},
{
"AttributeName": "time_taken",
"AttributeType": "N"
},
{
"AttributeName": "number_rows_processed_file",
"AttributeType": "N"
},
{
"AttributeName": "number_rows_created_db",
"AttributeType": "N"
},
{
"AttributeName": "info_messages",
"AttributeType": "S"
}
],
"KeySchema": [
{
"AttributeName": "audit_id",
"KeyType": "HASH"
}
],
"ProvisionedThroughput": {
"ReadCapacityUnits": {
"Ref": "ReadCapacityUnits"
},
"WriteCapacityUnits": {
"Ref": "WriteCapacityUnits"
}
}
},
"Type": "AWS::DynamoDB::Table"
}
CloudFormation给了我这个错误在试图旋转起来VPC: Property AttributeDefinitions is inconsistent with the KeySchema of the table and the secondary indexes
。
但是...是吗?我指定audit_id
为一个单独的键,并且它肯定存在于AttributeDefinitions列表中。我对CF(以及Dynamo)非常陌生,所以我很可能会错过一些非常明显的东西,但目前对我来说还不明显。
我到处搜索,只真正发现了一个关于此错误的提示,而更多的原因是开发人员和CF之间的一层,而不是CF本身。
谁能指出我的模板出了什么问题?