Tech Junkie Blog - Real World Tutorials, Happy Coding!: Iaas With AWS: Setup SSL/TLS With Application Load Balancer Part 2

Monday, December 28, 2020

Iaas With AWS: Setup SSL/TLS With Application Load Balancer Part 2

 In the previous post we created our certificates in the Certificate Manager, in this post we are going to create four instances using a Launch Template so that we could use it in our load balancer.  

1. We are actually going to use "Launch Template" to create our instances, so click on "Launch Templates" under "Instances" in the EC2 Dashboard

2.  Click on the "Create launch template" button
3. Give your template a name, then scroll down to AMI type

4. Select Amazon Linux 2 as the image, t2.micro as the instance type, and specify the "Key pair(login)"

Assign a security group with web traffic

5.  Accept the default VPC, and expand "Advance Details" and paste the following into the "User Data" to install Apache Web Server, then click on "Create launch template"

#Use this for your user data (script without newlines)
# install httpd (Linux 2 version)

yum update -y 
yum install -y httpd.x86_64 
systemctl start httpd.service 
systemctl enable httpd.service 
echo "Hello world from $(hostname -f)" > /var/www/html/index.html
cd /var/www/html/
cp index.html contacts.html

6. Select "Launch instance from this template

7.  Select the launch template you've just created and type 4 in the "Number of instances" field, make sure everything is correct, it should be because the template was applied.

8. Click "Launch instance from template" to create the four instances.

9. If you go to the "Instances" page you will see four instances being created

10. To make it easier to work with give the instances a name by click on the pencil icon


Search This Blog