为什么 AWS 云形成中的堆栈创建出现错误:"Provisioned Throughput cannot be left blank"?



AWS Cloud Formation 中的堆栈创建给出此错误:

Provisioned Throughput cannot be left blank

即使我的 JSON 包含该字段?

{"AWSTemplateFormatVersion": "2010-09-09",
    "Description": "CloudFormation template for My_Table”,
    "Resources": {
        "myDynamoDBTable": {
            "Type": "AWS::DynamoDB::Table",
            "Properties": {
                "AttributeDefinitions": [
                    {
                        "AttributeName": “abc”,
                        "AttributeType": "N"
                    },
                    {
                        "AttributeName": “xyz”,
                        "AttributeType": "S"
                    },
                    {
                        "AttributeName": “fgh”,
                        "AttributeType": "S"
                    }
                ],
                "KeySchema": [
                    {
                        "AttributeName": “abc”,
                        "KeyType": "HASH"
                    },
                    {
                        "AttributeName": “fgh”,
                        "KeyType": "RANGE"
                    }
                ],
                "ProvisionedThroughput": {
                    "ReadCapacityUnits": "5",
                    "WriteCapacityUnits": "5"
                },
                "TableName": “My_Table",
                "GlobalSecondaryIndexes": [
                    {
                        "IndexName": “xyz-index",
                        "KeySchema": [
                            {
                                "AttributeName": “xyz”,
                                "KeyType": "HASH"
                            }
                        ],
                        "Projection": {
                            "ProjectionType": "ALL"
                        }
                    }
                ]
            }
        }
    }
}

模板缺少GlobalSecondaryIndexes部分的预置吞吐量参数:

            "GlobalSecondaryIndexes": [
                {
                    "IndexName": "xyz-index",
                    "KeySchema": [
                        {
                            "AttributeName": "xyz",
                            "KeyType": "HASH"
                        }
                    ],
                    "Projection": {
                        "ProjectionType": "ALL"
                    },
                    "ProvisionedThroughput" : {         <== This bit here
                        "ReadCapacityUnits" : "5",
                        "WriteCapacityUnits" : "5"
                    }
                    ...

请参见: DynamoDB 全局二级索引

模板

看起来不错,但是在My_tabls"之前有一个奇怪的字符,应该是",而不是"

"TableName": “My_Table",

类似的奇怪角色也 GlobalSecondaryIndexes的一部分。

最新更新