How to do it...

Create a new CloudFormation template. We're going to add a total of 12 parameters to it:

  1. The first three parameters will contain the values we mentioned in the Getting ready section:
      VPCId:         Type: AWS::EC2::VPC::Id         Description: VPC where DB will launch       SubnetIds:         Type: List<AWS::EC2::Subnet::Id>         Description: Subnets where the DB will launch (pick at least 2)       SecurityGroupAllowCidr:         Type: String         Description: Allow this CIDR block to access the DB         Default: "172.30.0.0/16"
  1. We're also going to add the database credentials as parameters. This is good practice as it means we're not storing any credentials in our infrastructure source code. Note that the password contains the NoEcho parameter set to true. This stops ...

Get AWS Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.