I am trying to Create a new Sql server - RDS instance (with more storage ) from an existing snapshot ID. Below is my CloudFormation template that's throwing the error:
"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"
}
}
I copied this template from the AWS site http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-masterusername and tailored it. what's the problem ?
This worked:
{
"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 and MasterUserPassword are not mandatory, the template will be valid even without them.
Refer this thread for more information : Creating SQL RDS instance in CloudFormation