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"
}
}
]
}
}
}
}
答案 0 :(得分:1)
模板缺少GlobalSecondaryIndexes
部分的预配置吞吐量参数:
"GlobalSecondaryIndexes": [
{
"IndexName": "xyz-index",
"KeySchema": [
{
"AttributeName": "xyz",
"KeyType": "HASH"
}
],
"Projection": {
"ProjectionType": "ALL"
},
"ProvisionedThroughput" : { <== This bit here
"ReadCapacityUnits" : "5",
"WriteCapacityUnits" : "5"
}
...
答案 1 :(得分:0)
模板看起来很好,但在My_tabls"
之前有一个奇怪的角色,它应该是“,而不是”
"TableName": “My_Table",
“
中部分类似的奇怪字符GlobalSecondaryIndexes
。