AWS target groups — Backends for load balancers

Beginner
10 min read
Updated: Nov 2026
5 examples
ELB / EC2 / ALB

Definition and Usage

In AWS, a target group is how Elastic Load Balancing knows which backends should receive forwarded traffic—for example Amazon EC2 instances, IP addresses, or (with an Application Load Balancer) AWS Lambda functions.

What problem does a target group solve?

A load balancer needs a named pool of backends, a protocol and port to reach them, and health checks so unhealthy hosts stop getting new requests. The target group is that pool; listener rules on an ALB (or NLB) choose which group receives each request.

When should you use a target group?

Anytime you create an ALB or Network Load Balancer that forwards to EC2, containers, IPs, or Lambda. Use multiple groups for blue/green capacity, microservices, or path-based routing behind one DNS name.

What you will configure

Target type, name, protocol and port, VPC, health check path and matcher, then registered targets. Optional attributes include stickiness, deregistration delay, and slow start.

How it connects to the rest of ELB

Client → load balancer listener → listener rules → target group → healthy targets. For a diagram-focused ALB walkthrough, see Target groups and ALB; for creating the balancer itself, see Create an ALB.

Balancer type matters.

Path- and host-based routing are ALB-specific. Static IP and extreme TCP throughput are common NLB reasons. Pick the load balancer first, then create matching target groups.

No public DNS on the group.

Clients use the load balancer DNS name (or a Route 53 alias). The target group is an internal routing construct only.

Deregistration delay.

When you deregister a target or it fails checks, existing connections can drain briefly. Tune that value so long-lived connections finish without surprising drops.

Core Concepts

Ideas that show up across ALB and NLB target groups:

ConceptMeaning
Target groupNamed set of registered backends plus health checks and routing algorithm
Target typeInstances, IP addresses, or Lambda (ALB); container integrations via ECS/EKS
Health checkPeriodic probe path, port, interval, thresholds, and success codes
Listener ruleOn the load balancer; forwards (or redirects) to a target group
Round robinDefault ALB algorithm; least outstanding requests is an alternative
StickinessOptional cookie affinity so a client returns to the same target
Weighted forwardALB can split traffic across groups (blue/green style cutovers)
Auto ScalingASG can register/deregister instances on the group automatically

Prerequisites

Have these ready before you create a group in the console:

  • An AWS account with permission to manage Elastic Load Balancing and EC2 in your Region.
  • At least one running EC2 instance (for the instance target type) in the VPC you will select, with your app listening on the planned port.
  • A plan for which load balancer will reference the group—typically an Application Load Balancer.
Amazon EC2 dashboard in the AWS console
Amazon EC2

Examples

Create an instance target group in the EC2 console: open the wizard, set basics, register targets, and confirm.

Example 1 — Open Target Groups in EC2

Start from the EC2 Load Balancing menu in the correct Region.

  1. Open the EC2 console and confirm the Region.
  2. In the left navigation, expand Load Balancing and choose Target groups.
  3. Choose Create target group.
Target Groups in EC2 Load Balancing menu with Create target group
Amazon EC2

How It Works

  1. Target Groups is shared by ALB and NLB workflows in the EC2 console.
  2. Region must match the VPC and instances you will register.
  3. Create opens a wizard; nothing is live until you finish.
  4. Existing groups stay listed here for edits, health, and registration changes.

Example 2 — Basic Configuration

Choose instances, name, protocol, port, and VPC.

  1. Set Target type to Instances (typical for EC2 web servers).
  2. Enter a unique Target group name.
  3. Choose Protocol : Port—often HTTP : 80 when the app listens on HTTP behind the load balancer.
  4. Select the VPC that contains your instances, then continue.
Target group basic configuration wizard in EC2 console
Amazon EC2

How It Works

  1. Protocol/port is what the load balancer uses toward targets—not the client-facing listener port.
  2. IP address type is usually IPv4 unless you run IPv6 end-to-end.
  3. Protocol version (HTTP1, HTTP2, or gRPC) should match how the ALB will talk to backends.
  4. Tags are optional but useful for cost allocation and ownership.

Example 3 — Configure Health Checks

Point probes at a cheap readiness path your app can answer.

  1. Choose health check protocol (HTTP or HTTPS).
  2. Set a path such as / or a dedicated /health endpoint.
  3. Confirm success codes (often 200) match what the app returns.
  4. Leave intervals and thresholds at defaults for a first lab, then tighten later.

How It Works

  1. Probes run from the load balancer nodes to each registered target.
  2. Failed thresholds mark a target unhealthy so it stops getting new connections.
  3. Cheap endpoints beat probing heavy pages that can fail under load.
  4. Tune carefully—see a dedicated ALB health checks guide when you change thresholds in production.

Example 4 — Register EC2 Targets

Select instances and create the group.

  1. On the register targets step, select one or more EC2 instances.
  2. Confirm the port matches the target group (override per instance only if needed).
  3. Choose Create target group.
Register targets step selecting EC2 instances for target group
Amazon EC2

How It Works

  1. Registration adds instance IDs to the group; traffic waits on health.
  2. Initial / unused states are normal until a listener forwards to the group and checks pass.
  3. Auto Scaling can register new instances automatically when you attach the group to an ASG—see Auto Scaling with target groups.
  4. You can register more later from the group’s Targets tab.

Example 5 — Confirm Creation and Attach a Listener

Verify the group exists, then wire it to an ALB.

  1. Open the new group and confirm ARN, VPC, protocol, and registered targets.
  2. Watch health move toward healthy after checks succeed and a listener is attached.
  3. Attach the group with an ALB overview, the create ALB walkthrough, or Target groups and ALB.
  4. For gradual cutovers, use weighted target groups on advanced forward rules.
Target group created successfully in EC2 console list
Amazon EC2

How It Works

  1. The group exists independently until a listener rule references it.
  2. Unused often means no load balancer is attached yet.
  3. Healthy means checks succeeded; only then trust production traffic.
  4. DNS last: prove the ALB hostname, then map a domain with Route 53.

Edge Cases & Pitfalls

Most target group issues are health checks, security groups, or missing listener rules.

health

Targets stuck unhealthy

Wrong path, matcher, or port; or the instance security group blocks the load balancer.

unused

Status shows unused

No listener rule forwards to this group yet. Attach a default action or conditional rule on the ALB.

vpc

Cannot find instances to register

They are in a different VPC or Region than the target group.

type

Wrong target type for the workload

Lambda and IP targets have different limits than instances. Match type to how the app is deployed.

drain

Connections drop during deploy

Increase deregistration delay and drain before terminating instances in a rolling update.

mix

Expecting NLB features on an ALB group

Protocol and attribute options differ by load balancer type. Create the group for the balancer you actually use.

Key Takeaways

  • Target groups define where traffic goes and how AWS decides a backend is usable.
  • Health checks should reflect readiness—prefer a cheap /health over a heavy page.
  • Listeners reference groups; the group alone has no public hostname.
  • Next: attach the group to an ALB listener, then map DNS when the ALB hostname works.

One line: create group → health check → register targets → forward from a listener → verify healthy.

Frequently Asked Questions

A target group is a logical set of backends (such as EC2 instance IDs, IP addresses, or Lambda functions) registered with Elastic Load Balancing. An Application or Network Load Balancer forwards traffic to a group based on listener rules, using the group protocol, port, and health check settings.
The load balancer marks the target unhealthy and stops sending new connections to it until checks pass again. Existing connections may persist until they close or until deregistration and connection draining settings apply.
Yes. You register targets in different AZs within the same VPC. Application Load Balancers require subnets in at least two AZs, and spreading targets across zones improves fault tolerance.
No. Clients connect to the load balancer DNS name (or a Route 53 alias to it). The target group is an internal routing construct referenced by listener rules.
You can edit many health check settings in place. Tightening thresholds may briefly flip targets to unhealthy if the new criteria are harder to satisfy—plan changes during low traffic.
HTTP/2 is an application protocol version. HTTPS means HTTP over TLS. An ALB can terminate HTTPS on a listener while still forwarding HTTP/1.1 or HTTP/2 to targets, depending on your configuration.

Next: Application Load Balancer

Attach your target group to an ALB listener as a default or conditional forward action and test with the load balancer DNS name.

ALB →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful