How to do it...

  1. Start by defining the template version and description:
      AWSTemplateFormatVersion: "2010-09-09"      Description: Create an Auto Scaling Group
  1. Add a Parameters section with the required parameters that will be used later in the template:
      Parameters:        SubnetIds:          Description: Subnet IDs where instances can be launched          Type: List<AWS::EC2::Subnet::Id>
  1. Still under the Parameters section, add the optional instance configuration parameters:
      AmiId:         Description: The application server's AMI ID         Type: AWS::EC2::Image::Id         Default: ami-9be6f38c # AWS Linux in us-east-1       InstanceType:         Description: The type of instance to launch         Type: String         Default: t2.micro
  1. Still under the Parameters section, add the optional auto scaling ...

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.