Guide to Create Elastic Load Balancer in AWS
3 min readMay 25, 2023
This article gives high-level overview of how to create Elastic Application Load Balancer in AWS.
Perquisite
- Two EC2 Instances in running state.
To understand how to create an EC2 instance refer, Create an AWS EC2 Instance. This article provides high-level… | by Venkatesh Jujarao | Medium
Create Target Group
- Go to ec2/home → Target Group and click on create target group.
- Select target type → Instances.
- Provide the name, protocol and VPC group.
- Provide the health check endpoint. This is nothing but the endpoint running on your EC2 instance which will be used to do a health check and identify the status of the application.
- Click next and register the target. Select the EC2 instance and click on the include as pending below.
- Click on Create Group
- Follow the same process and create another target group (select 2nd EC2 instance while registering the target).
- Now we can see we have two target groups.
Create a Load Balancer
- Go to ec2/home → Load Balancer, click on create Load Balancer
- Select type of Load Balancer, here we are going with application load balancer. Click on create.
- Provide the name of load balancer, select scheme.
- Select network mapping and VPC.
- Select security group.
- Select listener and target group.
- Review the changes and click Create Load balancer button.
Configure Load Balancer Rule Set
- Once Load Balancer is in active state, setup up the rule.
- Click Save.
Summary
In this article we understood how to create a load balancer. With below video we can see how load balancer is working.