AWS Sysops Course
Labs Guide
Sameh Tawfik
Cloud and DevOps Consultant
https://www.linkedin.com/in/sameh-tawfik-consultant/
LAB2: Create a customized AMI and Launch an Application Load Balancer
Summary:
Create a new AMI image from the created instance in the previous lab, launch the 2nd instances from
the newly created Ami, then create an Application Load Balancer to distribute the HHTP requests on the
2 HTTPD instances.
Steps:
• Navigate to EC2 Dashboard > Instances.
• Select your instance, and then choose Actions, Image, Create Image.
• In the Create Image dialog box, specify the following information, and then choose Create Image.
- Image name – A unique name for the image.
- Image description – An optional description of the Image
• To view the status of your AMI while it is being created, in the navigation pane, choose AMIs. Initially,
the status is pending but should change to available after a few minutes.
• Launch an instance from your new AMI. Follow Lab 1 and in the AMI page when choosing the AMI
select My AMIs and select the AMI you created in previous step and choose different Availability
zone to launch this instance to guarantee HA.
• Browse the IP address of the new instance. You should see the same webpage as before.
• In the navigation pane, under Load Balancing, choose Target Groups.
• Click on Create target group.
• For Target group name, enter a name for the new target group.
• Keep the Target type as instance.
• Keep the default protocol (HTTP) and port (80).
• Select the VPC containing your instances.
• For Health checks, keep the default settings.
• Click on create button.
• After target group is created, check it and click on Actions, Register and deregister instance then
choose the 2 EC2 instances created before and click on Add to registered, then click on Save.
• In the navigation pane, under Load Balancing, click on Load Balancers.
• Click on Create Load Balancer.
• Under Application Load Balancer, Click Create.
1. Basic configuration
a. For Load balancer name, enter a name for your load balancer.
b. For Scheme, choose Internet-facing.
c. For IP address type, choose IPv4.
2. Listeners
a. Load Balancer Protocol: HTTP and Load balancer Port: 80
3. Availability Zones
a. For VPC, select the VPC that you used for your EC2 instances.
b. For Availability Zones, select two or more Availability Zones and corresponding subnets where
your EC2 instances are running.
4. Add-on services: optional
5. Tags
a. Add Key: Name and Value: ALB-yourname
• Click on Next: Configure Security Settings, choose Select an existing security group if you have any
that allows HTTP traffic, or choose Create a new security group.
• Click on Next: Configure Routing
1. Target group
a. Target group: Existing target group
b. Name: choose your target group name created before
• Click on Next: Register Targets
• Click on Next: Review
• Click on Create
• Wait sometime till ALB becomes in Active state
• Test the web access to the ALB using its DNS name to make sure you retrieve the HTML page.
• Test the ALB functionality by shutting down one instance and make sure that you are still able to
retrieve the HTML page.