gpt4 book ai didi

amazon-web-services - AWS CloudFormation : Invalid template property or properties [Type, 属性]

转载 作者:行者123 更新时间:2023-12-03 07:14:55 26 4
gpt4 key购买 nike

我正在尝试从现有快照 ID 创建新的 Sql 服务器 - RDS 实例(具有更多存储)。下面是我的 CloudFormation 模板,它抛出了错误:

"Template contains errors.: Invalid template property or properties [Type, Properties]"

"MyDB" : {
"Type" : "AWS::RDS::DBInstance",
"Properties" : {
"DBName" : { "Ref" : "NSGlobal" },
"DBSnapshotIdentifier":"rds:xxxxxxxxx-2016-07-13-17-00",
"AllocatedStorage" : "400",
"DBInstanceClass" : "db.m2.xlarge",
"EngineVersion" : "11.0"
}
}

我从 AWS 站点 http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-masterusername 复制了此模板并量身定制。有什么问题吗?

最佳答案

这有效:

{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
"DBInstance" : {
"Type": "AWS::RDS::DBInstance",
"Properties": {
"DBInstanceClass" : "db.m2.xlarge",
"AllocatedStorage" : "400",
"MasterUsername" : "myusername",
"MasterUserPassword" : "mypassword",
"DBSnapshotIdentifier":"xxxxxxxx-2016-07-13-17-00"
}
}
}
}

MasterUserName 和 MasterUserPassword 不是必需的,即使没有它们,模板也有效。

请参阅此帖子以获取更多信息:Creating SQL RDS instance in CloudFormation

关于amazon-web-services - AWS CloudFormation : Invalid template property or properties [Type, 属性],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38361006/

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