Aws CloudFormation:无效模板 属性 或属性 [Type, Properties]
Aws CloudFormation : Invalid template property or properties [Type, Properties]
我正在尝试从现有快照 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 复制了这个模板并对其进行了定制。有什么问题吗?
您缺少引擎 属性 使用下面的模板。这是引擎的有效选项。
有效值:MySQL |玛丽亚数据库 |甲骨文se1 |甲骨文甲骨文sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver网络 |邮政编码 |极光
"MyDB" : {
"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"
}
}
}
}
这有效:
{
"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
我正在尝试从现有快照 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 复制了这个模板并对其进行了定制。有什么问题吗?
您缺少引擎 属性 使用下面的模板。这是引擎的有效选项。
有效值:MySQL |玛丽亚数据库 |甲骨文se1 |甲骨文甲骨文sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver网络 |邮政编码 |极光
"MyDB" : {
"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"
}
}
}
}
这有效:
{
"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