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

标签 amazon-web-services aws-cloudformation amazon-rds

我正在尝试从现有快照 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/

相关文章:

mysql - 无法从我自己的计算机以外的任何计算机(包括 Cloud9)访问 AWS MySQL 实例

elasticsearch - 如何通过AWS VPC使用Elastic Cloud的Logstash从MySQL(AWS RDS)导入数据?

python - 在 django 上使用 Amazon S3 使用 ImageField 上传图像

MySQL:InnoDB 与 MyISAM:如何以及为什么要改变 (Amazon RDS)?

amazon-web-services - 如何在CloudFormation中指定AMI?

amazon-web-services - 属性安全组的值必须是字符串列表类型

amazon-web-services - 基于 AWS 区域的不同 AMI?

mysql - RDS 数据库存储空间不足

amazon-web-services - 有没有办法在 ecr token 过期之前撤销它们( token 的默认生命周期为 12 小时)?

amazon-web-services - AWS Glue 爬虫无法对 CSV 文件进行分类