DEV Community

Saloni Singh
Saloni Singh

Posted on

Learning AWS Day by Day — Day 11 — Creating Elastic Load Balancer

Image description

Exploring AWS !!

1.Select Application Load Balancer.

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

  1. Check once the 3 instances are launched.

Image description

  1. 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

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

Image description

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

Image description

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

Image description

  1. The below will be the third webpage

Image description

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

Image description

  1. Click on Create Classic Load Balancer

Image description

  1. 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

  1. Our classic Load balancer is working

Image description

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

Image description

  1. Click on Launch ALB migration Wizard

Image description

  1. Click on Create

Image description

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

Image description

  1. Finally, Application Load Balancer is working as well

Image description

Application Load Balancer is working

Top comments (0)