Creating a database with automatic failover
In this recipe, we're going to create a MySQL RDS database instance configured in multi-AZ mode to facilitate automatic failover.
Database with automatic failover
Getting ready
The default VPC will work fine for this example. Once you are comfortable with creating databases, you may want to consider a VPC containing private subnets that you can use to segment your database away from the Internet and other resources (in the style of a three tier application). Either way, you'll need to note down the following:
- The ID of the VPC
- The CIDR range of the VPC
- The IDs of at least two subnets in your VPC. These subnets need to be in different Availability Zones, for example,Â
us-east-1a
andus-east-1b
How to do it...
Create a new CloudFormation template. We're going to add a total of 12 parameters to it:
- The first three parameters will contain the values we mentioned in the Getting ready section:
     VPCId:     Type: AWS::EC2::VPC::Id      Description:...