gpt4 book ai didi

amazon-web-services - 为什么 AWS Cloud Formation 中的堆栈创建会出现错误 : "Provisioned Throughput cannot be left blank"?

转载 作者:行者123 更新时间:2023-12-03 07:32:43 25 4
gpt4 key购买 nike

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 Global Secondary Indexes

关于amazon-web-services - 为什么 AWS Cloud Formation 中的堆栈创建会出现错误 : "Provisioned Throughput cannot be left blank"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27426094/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com