Creating launch configuration

A launch configuration is a template which is used by the auto scaling group to select and configure the EC2 instances. This includes configuring the IAM role, configuring the IP address, disk size, security group, and public-private key pair to access the instances. You cannot modify the launch configuration after you have created it:

  1. From the EC2 dashboard navigation pane, click on Launch Configurations, then on Create Auto Scaling group, and on the Create launch configuration button to start the launch configuration creation process:
  1. The first step is to select the AMI; as we have already created an AMI earlier, select it from My AMIs in the navigation pane:
  1. The next step select the instance type. We select t2.micro instance. Now, click on the Next: Configure details button:
  1. In this step, we will configure the AMI. Apart from filling in the usual values, such as the name, most of the other parameters are already discussed in Chapter 3, AWS Components, Cost Models, and Application Development Environments, under the Creating an EC2 Instance section. Click on the Advanced Details hyperlink to see all the fields. We select the option to Assign a public IP address to every instance so that we can SSH into it. As a good security practice, for production servers select the option of Do not Assign a public IP address for any of the instances. If you want to access the instances then you can create an EC2 instance which can only be connected to from your static IP address, and from there you can access any instance. This is sometimes called a bastion host, or jump host. Now, click on the Next: Add Storage button:
  1. Next we add storage to the AMI; use the defaults unless your requirement is for high disk bandwidth. Now, click on the Next: Configure Security Group button.
  1. Next, we configure the security group; use the one which was created in Chapter 3, AWS Components, Cost Models, and Application Development Environments, under the Creating Security Groups section (and modified earlier in this section):
  1. Next we review the launch configuration and make changes if required. Now, click on the Review button:
  1. Click on the Create launch configuration button. Before the launch configuration is created you need to provide the public private key pair to SSH into the instance. Select the public private key created in Chapter 3AWS Components, Cost Models, and Application Development Environments,  under the Creating EC2 Instance Key Pairs section, the ec2AccessKey. Now, click on the Create launch configuration button:

You should see the following screen. Click on Create an Auto Scaling group using this launch configuration button:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.167.107