Launch Template

Prerequisites


Create an Auto Scaling group using a Launch Template


  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2
  2. On the navigation bar at the top of the screen, choose the same AWS Region that you used when you created the launch template.
  3. In the navigation pane, choose Auto Scaling Groups.
  4. Choose Create Auto Scaling group.
  5. On the Choose launch template or configuration page, do the following:
    • For Auto Scaling group name, enter a name for your Auto Scaling group.
    • For Launch Template, choose an existing launch template.
    • For Launch template version, choose whether the Auto Scaling group uses the default, the latest, or a specific version of the launch template when scaling out.
    • Verify that your launch template supports all of the options that you are planning to use, and then choose Next.

Launch Template

  1. On the Configure settings page, for Purchase options and instance types, choose Adhere to the launch template to use the EC2 instance type and purchase option that are specified in the launch template.
  2. Under Network, for VPC, choose the VPC for the security groups that you specified in your launch template. Launching instances using a combination of instance types and purchase options is not supported in EC2-Classic.
  3. For Subnet, choose one or more subnets in the specified VPC. Use subnets in multiple Availability Zones for high availability. For more information about high availability with Amazon EC2 Auto Scaling, see Distributing Instances Across Availability Zones.

Configure

  1. Choose Next. Or, you can accept the rest of the defaults, and choose Skip to review.
  2. (Optional) On the Specify load balancing and health checks page, configure the following options, and then choose Next.

ELB

  1. (Optional) On the Configure group size and scaling policies page, configure the following options, and then choose Next

GroupSize1

GroupSize2

  1. (Optional) To receive notifications, choose Add notification, configure the notification, and then choose Next. For more information, see Getting Amazon SNS Notifications When Your Auto Scaling Group Scales.

![Notifications]/images/3-ec2/ASGLaunchTemplate/ASGNotifications.png?width=90pc)

  1. (Optional) To add tags, choose Add tag, provide a tag key and value for each tag, and then choose Next. For more information, see Tagging Auto Scaling Groups and Instances.

Tags

  1. On the Review page, choose Create Auto Scaling group.

Create an Auto Scaling group using the command line


You can use one of the following commands: