Learning AWS Day by Day — Day 11 — Creating Elastic Load Balancer
Tags: aws, cloud, cloudcomputing, beginners
Published: 2024-03-20 16:56:42


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a160lgrilby9ysrwdizx.png)

Exploring AWS !!

1.Select Application Load Balancer.
2. Choose all regions.
3. Select Target Group and give a name.
4. Select the instance.
5. Click Create.
6. Open targets and click on target.
7. Go to target tab and Register.
8. Select one and register then it’s created.
9. Copy DNS.
10. To connect another Target group, go to Target group section.
11. Create Target and select instance.
12. Select Target group name, click Next.
13. To attach the target to load balancer, go to load balancer.
14. Click on listeners, click View and Edit rule.
15. Go to edit, click Edit icon and Delete previous one.
16. Forward to application target and give 8.
17. Click application target and give 2.
18. Click on the Tick Mark.
19. Click Update.
20. The Load balancer is created.

Go through the below steps and try creating different Load Balancers in EC2, these are the real world scenarios mentioned. The steps below can help you understand a lot and give you a good hands-on with Load Balancers.

1. Create 3 EC2 instances using Ubuntu Server AMI


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4idwn6u5zdvqjv8ck40z.png)

2. Check once the 3 instances are launched.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0fcustmrix8begi9xmdh.png)



3. Connect the first instance via Instance connect and install apache2 and edit the apache2 Welcome page by replacing it with the desired web page


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8vafom9m3uallyem34jp.png)

4. Once the new page is created, launch the same using Public IPv4 address to check if it’s working


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ncjbk8iw5u11mq8qzrfn.png)



5. Similarly connect via second instance and third one too, and replace the file index.html with the desired web page


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w059jt0o24ddc38vzcdh.png)



6. Our second page will look like the one shown below


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uf9kbt1zat0fyzr095ge.png)



7. The below will be the third webpage


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o22r1za9ab34v89qzrwt.png)



8. Go to load balancers and click on Create Load Balancers


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s0tkp016w045vjskfgjz.png)



9. Click on Create Classic Load Balancer


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/np9ygh1fpldjztyalgm8.png)



10. Give the load balancer a name and add Security group for HTTP as Anywhere and add the instances and launch the Load balancer, copy the DNS name and paste it in a new browser to check if its working


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/czgeucc4876fw3434u6j.png)



11. Our classic Load balancer is working


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u9sgk2grxq73tu9gfqeg.png)



12. Click on Migrate Now to migrate the Classic Load Balancer to Application Load Balancer


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4hzbiami97srcg7m9d7f.png)



13. Click on Launch ALB migration Wizard


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ylh15symijoa1rw9csnu.png)



14. Click on Create


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9c5qsgs6xe27dbf7t6m.png)



15. Our Application Load Balancer is created, copy the DNS name to check if its working


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dt1bi921hr3holwsirde.png)



16. Finally, Application Load Balancer is working as well


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wdv1th83kziiv5ldqk5k.png)



Application Load Balancer is working