A target group tells an Application Load Balancer which registered backends should receive forwarded traffic, on which target port, and how to health check them. Listeners (for example HTTP on 80 or HTTPS on 443) live on the load balancer; listener rules choose which target group handles each client request.
What does a target group do?
It is a pool of targets—commonly EC2 instances—plus protocol, port, load-balancing algorithm, and health-check settings. The ALB never “listens” on the target group port for clients; clients hit the ALB, then traffic is forwarded to healthy targets.
When should you create one?
Create a target group before or during ALB creation whenever you need a forward action. Use multiple groups for blue/green capacity, microservices, or path-based routing behind one DNS name.
What you will configure
Target type (instances), protocol and port, VPC, health check path and matcher, registered EC2 targets (including pending), then association via an ALB listener rule. Optional attributes such as stickiness come later.
After targets are healthy
Finish or update the ALB listeners, then publish the load balancer hostname with Route 53 alias records when you are ready for a custom domain.
Listeners vs target ports.
Clients may use HTTPS on 443 on the ALB while targets receive HTTP on 80 or 8080. That split is normal when the ALB terminates TLS.
Security groups both ways.
Allow client→ALB on the listener ports, and ALB→instance on the target group port. Missing the second rule is a common cause of perpetual unhealthy targets.
Health checks decide traffic.
Keep checks cheap (for example GET /health) and aligned with what your app needs to serve. Unhealthy targets stop receiving new requests.
Reference
Core Concepts
Terms you will use while creating and wiring a target group:
Concept
Meaning
Target group
Registered backends plus health checks and routing algorithm
Target type
Instances, IP addresses, or Lambda (this guide uses instances)
Listener
ALB front-end protocol/port that accepts client connections
Listener rule
Conditions + actions that forward (or redirect) to a target group
Health check
Periodic probe path, port, interval, and success codes
Pending registration
Target staged for the group until registration and checks complete
Deregistration delay
Time in-flight requests may finish after a target is removed
Stickiness
Optional cookie-based affinity so a client returns to the same target
Before you start
Prerequisites
Have these ready before you open Target Groups:
An AWS account with permission to manage Elastic Load Balancing and EC2 in your Region.
One or more runningEC2 instances in the VPC you will select, with your app listening on the planned target port.
Optional but recommended: know the ALB you will attach (or follow create an ALB after this group exists). Review target group concepts if you need attribute background.
Amazon EC2
Walkthrough
Examples
Create the target group, configure health checks, register EC2, confirm creation, then associate it with an ALB.
Example 1 — Open Create Target Group
Start the wizard from the EC2 Load Balancing menu.
Open the EC2 console in your Region.
In the left navigation, under Load Balancing, choose Target Groups.
Choose Create target group.
Amazon EC2
How It Works
Target Groups is an EC2 console section shared by ALB and NLB workflows.
Region must match the VPC and instances you will register.
Create opens a multi-step wizard; nothing is live until you finish.
Existing groups stay listed here when you return to edit registration or health checks.
Example 2 — Basic Configuration and Health Checks
Choose instances, protocol, VPC, and a health check path your app can answer.
Select target type Instances (for this tutorial).
Enter a name, choose protocol and port (for example HTTP and 80), and select the VPC of your instances.
Under health checks, set a path such as / or /health and confirm the success codes match your app.
Amazon EC2
How It Works
Protocol/port is what the ALB uses to talk to instances—not the client-facing listener port.
VPC must contain the instances you plan to register.
Health checks must return a success code on that path or targets stay unhealthy. See a deeper ALB health checks guide when you tune thresholds.
Next moves you to register targets before the group is finalized.
Example 3 — Register EC2 Instances
Select instances and include pending registration when the console offers it.
On the register targets step, select one or more EC2 instances.
Confirm the port matches the target group (override per instance only if needed).
If shown, use Include as pending below so instances appear under pending registration until checks succeed.
Choose Include as pending below / continue as prompted, then proceed to review.
Amazon EC2
How It Works
Registration adds instance IDs to the group; traffic waits on health.
Pending is expected briefly while checks start—prolonged pending usually means SG or app issues.
Port override helps when one instance serves a different process port.
You can register more targets later from the group’s Targets tab.
Example 4 — Review and Create
Confirm settings and create the target group.
Review name, protocol, VPC, health check, and selected targets.
Choose Create target group.
Open the new group and watch target health move from initial / unused toward healthy once the ALB (or checks) can reach the app.
Amazon EC2
How It Works
The group exists independently until a listener rule references it.
Unused health can appear when no load balancer is attached yet—attach a listener next.
Healthy means checks succeeded; only then should you expect production traffic.
Edit anytime to change health checks or register/deregister targets.
Example 5 — Associate the Group with an ALB
Point a listener default (or rule) action at this target group.
On an HTTP or HTTPS listener, set the default action (or a rule) to Forward to this target group.
On the target group details page, confirm the associated load balancer appears.
Test the ALB DNS name, then map a domain with Route 53 when ready. For gradual cutovers, consider weighted target groups.
Amazon EC2
How It Works
Association is via listener rules—not a separate “attach” checkbox alone.
One ALB, many groups is normal for path/host routing or blue/green.
HTTPS listeners need an ACM certificate; targets can still speak HTTP.
DNS last: prove the ALB hostname works before changing production Route 53 records.
Edge Cases & Pitfalls
Most unhealthy targets are security groups, wrong ports, or health check paths.
sg
ALB cannot reach the instance port
Allow inbound from the ALB security group to the target port on the instance security group.
health
Health check path returns 404 or 301
Match the success codes to what the app returns, or change the path to a real health endpoint.
port
Listener 443 vs target 80 confusion
Clients hit 443 on the ALB; targets often listen on 80/8080. Configure both sides correctly.
vpc
Wrong VPC selected
Instances outside the target group VPC cannot register. Recreate or pick the matching VPC.
unused
Targets show unused
No listener rule forwards to this group yet. Attach a default action or rule on the ALB.
drain
Requests fail during deploy
Tune deregistration delay and drain connections before terminating instances during rolling updates.
Remember
Key Takeaways
Listeners accept clients; target groups define backends, ports, and health checks.
Register EC2, then wait for healthy before trusting production traffic.
Wire via listener rules on the ALB; multiple groups enable routing and blue/green.
Next: prove the ALB DNS name, then point your domain with Route 53.
One line: create group → health check → register EC2 → forward from ALB listener → DNS.
Frequently Asked Questions
Listeners accept client connections on a load balancer front-end port and protocol, such as HTTPS on 443. A target group is a pool of backends (for example EC2 instances) with a protocol and port for forwarded traffic plus health checks. Listener rules decide which target group receives each request.
The target is staged for the group but may not yet receive traffic until health checks pass and any registration workflow completes. Ensure security groups and the application listen on the target port the group expects.
Yes. Common patterns include host-based or path-based routing to different services, blue/green deployments with two groups, or separate groups per microservice behind one ALB DNS name.
Clients connect to 443 on the load balancer. The ALB terminates TLS when configured and forwards to targets over the protocol and port on the target group, commonly HTTP to instance port 80 or 8080.
Check security groups (ALB nodes must reach the target port), that the application listens on the expected interface, and the health check path, port, and matcher code. Mismatched VPC or wrong port is a frequent cause.
Both are valid. Creating the group first (this guide) lets you verify registration and health before attaching a listener. You can also create or select a target group while creating the ALB.