AWS Cloud Practitioner: Load Balancer

In this short series, I outline the notes that I took while preparing for the AWS Cloud Practitioner exam.

These are my personal notes that I have made while working through the A Cloud Guru exam practitioner course. They are in no way official notes from AWS.

I would advise you that if you do use my notes to help you revise for this exam, that you use them as a supplement to the most recent information in the White PapersExam Guide and go over your knowledge with practice exam papers.

Previous notes within this blog series:

Using A Load Balancer

  • Three types of load balancers:
    • Application Load Balancers (HTTP/HTTPS) – Application aware means that they can see into Layer 7 making intelligent decisions about traffic routing. Good for applications because they can see into the code.
    • Network Load Balancers (TCP) – Used when you need ultra high performance and static IP addresses.
    • Classic Load Balancers (Previous Generation) – Test & Dev, keep costs low. Slowly being phased out.

Bootstrap script Script that runs upon booting the EC2 instance.

#!/bin/bash
yum update -y
yum install httpd -y
service httpd start
chkconfig on
cd /var/www/html
echo "html body h1 Hello Cloud Gurus. This is webserver02 /h1 /body /html > index.html

If you browse to the public IP of this web server then the bootstrap script should have run and you should see the html displayed

Note: If you add more than one ec2 instance to a load balancer, make sure that each is targeting different availability zones

To go to your web server via the load balancer, you need to use the DNS name on the load balancer.
Add more web servers to the load balancer using the Target Groups.menu.

This will point you to the first available instance of your web server being managed by the load balancer.

EC2 instances should always be in different availability zones!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top