Follow the steps bellow to create a launch template for an Auto Scaling group:
- Go to Amazon EC2 console at https://console.aws.amazon.com/ec2/ and on the navigation bar, select a region.
- Next in the navigation pane, choose Instances, Launch Templates and choose Create launch template.
- 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.
- 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.
- Bypass Security Groups to configure a security group as part of the network interface. You cannot specify security groups in both places.
- 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.
- You can specify Storage (Volumes) attach to the instances.
- 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:
- Go to your Amazon EC2 console at https://console.aws.amazon.com/ec2/.
- On the navigation bar, select a region and under Auto Scaling, choose Auto Scaling Groups.
- 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.
- 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.
- Select a hardware configuration for your instances for the Choose Instance Type
- In the Configure details step, do the following:
- For Name, type a name for your launch configuration.
- 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.
- Choose Skip to review.
- 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.