# AWS Elastic Load Balancing (ELB)

> Elastic Load Balancing (ELB) distributes incoming traffic across healthy targets in several Availability Zones: Application, Network and Gateway load balancers.

- Source: https://www.itwonderlab.com/aws-elastic-load-balancing/
- Published: 2026-10-05
- Updated: 2026-10-05
- Author: Javier Ruiz Jiménez (https://www.javierruizjimenez.com/)
- Site: IT Wonder Lab (https://www.itwonderlab.com/)

---

**Elastic Load Balancing (ELB)** is the AWS service that automatically distributes incoming traffic across multiple targets, such as [EC2](https://www.itwonderlab.com/aws-ec2/) instances, containers and IP addresses, in one or more Availability Zones. It checks the health of the targets and sends requests only to the healthy ones, so a failed instance does not interrupt the service.

### Types of load balancers

| Type | Layer | Typical use |
|---|---|---|
| **Application Load Balancer (ALB)** | 7 (HTTP, HTTPS, gRPC) | Web sites and APIs. Routing by host, path, header or query string, redirects, HTTPS termination |
| **Network Load Balancer (NLB)** | 4 (TCP, UDP, TLS) | Very high throughput and low latency, static IP addresses per Availability Zone |
| **Gateway Load Balancer (GWLB)** | 3 | Firewalls and traffic inspection appliances |
| **Classic Load Balancer** | 4 and 7 | Previous generation, kept for old applications |

### Key concepts

- **Listener**: the protocol and port the load balancer listens on (for example HTTPS 443) and the rules that decide what to do with each request.
- **Target group**: the set of targets that receive the traffic and the **health check** that decides which are healthy.
- **Cross-zone load balancing**: distributes requests evenly between the targets of all the enabled zones.
- A load balancer lives in at least two **public** (internet-facing) or **private** (internal) [subnets](https://www.itwonderlab.com/aws-subnets/), and is protected with [security groups](https://www.itwonderlab.com/aws-security-groups/).
- HTTPS certificates come from [AWS Certificate Manager](https://www.itwonderlab.com/aws-acm/). [AWS WAF](https://www.itwonderlab.com/aws-waf/) can be attached to an ALB.

### Pricing

Billed per hour that the load balancer runs plus the capacity used (Load Balancer Capacity Units, or Network Load Balancer Capacity Units). See the [Elastic Load Balancing pricing](https://aws.amazon.com/elasticloadbalancing/pricing/).

### With Terraform

The resources are `aws_lb`, `aws_lb_target_group`, `aws_lb_listener` and `aws_lb_listener_rule`.

See tutorials:

-   [AWS with Terraform: The Essential Guide (16/21) – AWS Load Balancers](https://www.itwonderlab.com/aws-terraform-tutorial-aws-load-balancers/)
-   [Terraform AWS EKS Cluster Deployment & Application Publishing through ALB](https://www.itwonderlab.com/terraform-eks/)

See also: [AWS Auto Scaling](https://www.itwonderlab.com/aws-auto-scaling/), [AWS Route 53](https://www.itwonderlab.com/aws-route-53/).
