1
votes

i'm creating a rds using aws cloud formation template and i want the rds to deploy on multi az. i don't want to create cluster i want to deploy db instance with multi az. here is my code

"DatabasePrimaryInstance": {
      "Type": "AWS::RDS::DBInstance",
      "Properties": {
         "AllocatedStorage": "200",

        "MultiAZ"           : true,
        "Engine": "aurora",
         "DBName":{
               "Ref":"DatabaseName"
            },
             "MasterUsername":{
               "Ref":"DatabaseUsername"
            },
            "MasterUserPassword":{
               "Ref":"DatabasePassword"
            },
          "PreferredBackupWindow":"02:00-03:00",
            "PreferredMaintenanceWindow":"mon:03:00-mon:04:00",
            "BackupRetentionPeriod":{
               "Ref":"DatabaseBackupRetentionPeriod"
            },
            "PubliclyAccessible": false,
        "DBInstanceIdentifier": { "Fn::If" : [ "CreateProdResources", "prod-db",  "uat-db" ]},
        "DBInstanceClass":   { "Fn::If" : [ "CreateProdResources", "db.r3.xlarge",  "db.r3.xlarge" ]},
        "DBSubnetGroupName": {
          "Ref": "DatabaseSubnetGroup"
        },
        "VPCSecurityGroups":[{"Ref": "DatabaseSecurityGroups"}]
      }

    }

when i run the template i get an error saying VPC Multi-AZ DB Instances are not available for engine: aurora. what i'm missing?

1

1 Answers

0
votes

The error you are seeing is correct. The combination you are trying to make is simply not possible.

You can only use one of the following scenarios:

  • Use Aurora, and work with clusters. AWS will handle the multi AZ stuff
  • Work with non Aurora RDS, then you handle the multi AZ stuff.