Amazon Web Services (AWS) offers a robust and flexible cloud infrastructure, and one of the key components of managing web traffic is using Target Groups in combination with Elastic Load Balancers (ELB) or Auto Scaling Groups (ASG). A Target Group is used to define the targets (like EC2 instances, Lambda functions, or IP addresses) that a load balancer or Auto Scaling group routes traffic to. This allows for highly available, fault-tolerant applications that scale with demand.
What is a Target Group?
A Target Group is a set of resources (EC2 instances, Lambda functions, or IPs) that receive incoming traffic routed by a load balancer or Auto Scaling group. The target group is responsible for monitoring the health of the resources, and only healthy targets will receive traffic. AWS allows you to define different types of targets for different use cases, such as routing traffic to EC2 instances, containers, or Lambda functions.
Prerequisites
Before creating a target group, ensure the following.
- You have an AWS account with sufficient permissions to create resources like load balancers and target groups.
- A running Elastic Load Balancer (ELB) or Auto Scaling Group (ASG) (optional for integration).
- EC2 instances, Lambda functions, or IP addresses that can serve as targets for your target group.
Steps to create a target group
Step 1. Open the Amazon EC2 Console.
- Log into your AWS Management Console.
- Navigate to EC2 by typing “EC2” in the search bar and selecting it from the services list.

Step 2. Access the Target Groups Section.
In the left navigation pane under the Load Balancing section, click on Target Groups.

This will take you to the Target Groups page, where you can view, create, and manage your target groups.
Step 3. Create a New Target Group.
Click the Create Target Group button at the top of the Target Groups page.

You will be prompted to select a target type. Here, you have several options.
- Instances: Routes traffic to EC2 instances.
- IP addresses: Routes traffic to IP addresses (useful for containerized applications or external resources).
- Lambda functions: Routes traffic to AWS Lambda functions (ideal for serverless applications).
- Choose the appropriate target type for your needs.

Step 4. Configure Target Group Settings.
- Name: Provide a name for your target group. Make sure the name is descriptive so that you can easily identify the target group later.

- Protocol: Select the protocol (HTTP, HTTPS, TCP, etc.) for your target group. The protocol determines the communication method between the load balancer and the targets.
- Port: Specify the port your targets will listen on (e.g., port 80 for HTTP or port 443 for HTTPS).

- VPC: Select the Virtual Private Cloud (VPC) where your targets are located. This ensures that the load balancer and targets are within the same networking environment.










Join the conversation! Your thoughts help the community grow.