Elastic Load Balancer in AWS

Last Updated : 1 Jun, 2026

Elastic Load Balancing (ELB) automatically distributes incoming application traffic across multiple targets, such as Amazon EC2 instances, containers, IP addresses, and Lambda functions. It acts as the "front door" for your application, ensuring high availability, fault tolerance, and elasticity.

Core Concepts

  • Listeners: A listener checks for incoming connection requests on a specific protocol and port.
  • Target Groups: A logical group of backend resources such as EC2 instances, containers, IP addresses, or Lambda functions. The load balancer sends traffic to the target group instead of directly to individual instances.
  • Health Checks: ELB regularly checks the health of targets using a path like /health. If a target becomes unhealthy, ELB stops routing traffic to it until it recovers.
  • Cross-Zone Load Balancing: Distributes traffic evenly across healthy targets in all enabled Availability Zones, helping prevent overload in a single zone.
1

Steps to configure an Application Load Balancer in AWS

Step 1: Launch the two instances on the AWS management console named Instance A and Instance B. Go to services and select the load balancer. To create AWS free tier account refer to Amazon Web Services (AWS) – Free Tier Account Set up.

Screenshot-2026-05-25-101403

Step 2: Scroll down on the left side panel, go to Load Balancers, and click on Create Load Balancer.

Screenshot-2026-05-25-101535

Step 3: Select Application Load Balancer and click on Create.

Screenshot-2026-05-25-101742

Step 4: Here you are required to configure the load balancer. Write the name of the load balancer. Choose the scheme as internet facing.

Screenshot-2026-05-25-102057

 Step 5: Add at least 2 availability zones. Select us-east-1a and us-east-1b

Screenshot-2026-05-25-102248

Step 6: Select the default security group.

Screenshot-2026-05-25-102401

Step 7: In the Listener and Routing section, click on Create New Target Group.

Screenshot-2026-05-25-102818

Step 8: Choose the Target Group Name, select the Protocol, and enter the Port Number.

Screenshot-2026-05-25-103108

Step 9: Choose instance A and instance B and Click on Next: Review.

Screenshot-2026-05-25-103315

Step 10: Review all the configurations and click on Create Target Group. After that, return to the Load Balancer Creation page and select my-target-group in the routing section.

Screenshot-2026-05-25-103430

Step 11: Scroll down and click on Create Load Balancer.

Screenshot-2026-05-25-103935

Step 12: Congratulations!! You have successfully created a load balancer.

Screenshot-2026-05-25-104443

Step 13: This highlighted part is the DNS name which when copied in the URL will host the application and will distribute the incoming traffic efficiently between the two instances.

Screenshot-2026-05-25-104217

Step 14: This is the listener port 80 which listens to all the incoming requests

Screenshot-2026-05-25-104330

Step 15: This is the target group that we  have created

Screenshot-2026-05-25-104602

Step 16: Now we need to delete the Load balancer. Go to Actions -> Click on Delete.

Screenshot-2026-05-25-104707

Step 17: Also don't forget to terminate the instances.

Screenshot-2026-05-25-105823

When to Use Which?

ALB

  • Use for web applications, websites, APIs, and microservices.
  • Supports HTTP, HTTPS, and gRPC traffic.
  • Best when you need advanced routing based on URL paths, hostnames, or headers.
  • Suitable for applications that require Layer 7 (Application Layer) features.
  • Does not provide static IP addresses; access is through DNS.

NLB

  • Use for gaming, financial applications, IoT systems, and real-time services.
  • Supports TCP, UDP, and TLS traffic.
  • Best when you need ultra-low latency and high performance.
  • Provides static IP addresses for each Availability Zone.
  • Suitable for applications that require Layer 4 (Transport Layer) load balancing with simple routing.

Pricing Models

ELB pricing is based on two components: an hourly charge and a usage charge (Capacity Units).

Load BalancerHourly ChargeUsage Metric
ALB~$0.0225 / hourLCU (Load Balancer Capacity Units) - Based on new connections, active connections, and bandwidth.
NLB~$0.0225 / hourNLCU (Network Load Balancer Capacity Units) - Based on bandwidth and connections.
GWLB~$0.0125 / hourGLCU (Gateway Load Balancer Capacity Units).
CLB~$0.025 / hourData Transfer (GB).
Comment