How to Create a Launch Template for AWS Auto Scaling

Follow the steps bellow to create a launch template for an Auto Scaling group:

  1. Go to Amazon EC2 console at https://console.aws.amazon.com/ec2/ and on the navigation bar, select a region.
  2. Next in the navigation pane, choose Instances, Launch Templates and choose Create launch template.
  3. Then select Create a new template and provide a name and description for the launch template. For AMI ID, choose an AMI ID from which to launch an instance.
  4. For Instance type, choose a hardware configuration that is compatible with the AMI that you specified. You can use Key pair name and specify Network type. Choose whether to launch your instances into a VPC or EC2-Classic, if applicable.
  5. Bypass Security Groups to configure a security group as part of the network interface. You cannot specify security groups in both places.
  6. For Network interfaces, configure Auto-assign public IP and Security group ID. To launch instances into a VPC, you must specify a security group that is created for that VPC.
  7. You can specify Storage (Volumes) attach to the instances.
  8. For Tags, specify one or more tags to associate with the instances and volumes and choose Create launch template. On the confirmation page, choose Create Auto Scaling group.

Launch configuration is similar to a launch template, it specifies the type of EC2 instance that Amazon EC2 Auto Scaling creates for you. You create the launch configuration by including information such as the ID of the Amazon Machine Image (AMI).

 

Follow the steps bellow to create a launch configuration:

  1. Go to your Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. On the navigation bar, select a region and under Auto Scaling, choose Auto Scaling Groups.
  3. Then on the Welcome to Auto Scaling page, choose Create Auto Scaling group. Choose Launch Configuration, Create a new launch configuration, and then choose Next Step.
  4. In the next step for the Choose AMI step, there is a list of basic configurations, called Amazon Machine Images (AMIs), that serve as templates for your instances.
  5. Select a hardware configuration for your instances for the Choose Instance Type
  6. In the Configure details step, do the following:
    1. For Name, type a name for your launch configuration.
    2. For Advanced Details, select an IP address type. If you want to connect to an instance in a VPC, you must select an option that assigns a public IP address.
    3. Choose Skip to review.
  7. On the Review step, choose Edit security groups. Follow the instructions to choose an existing security group, and then choose Review. Choose Create launch configuration.

Complete the Select an existing key pair or create a new key pair step as instructed and choose Create launch configuration. The launch configuration is created and the wizard to create an Auto Scaling group is displayed.

CreateAutoScalingLaunchTempAWS01.jpg