Elastic Load Balancing
Application Load Balancers

Create a Target Group

You register your targets with a target group. By default, the load balancer sends requests to registered targets using the port and protocol that you specified for the target group. You can override this port when you register each target with the target group.

After you create a target group, you can add tags.

To route traffic to the targets in a target group, specify the target group in an action when you create a listener or create a rule for your listener. For more information, see Listener Rules.

You can add or remove targets from your target group at any time. For more information, see Register Targets with Your Target Group. You can also modify the health check settings for your target group. For more information, see Modify the Health Check Settings of a Target Group.

To create a target group using the console

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. On the navigation pane, under LOAD BALANCING, choose Target Groups.

  3. Choose Create target group.

  4. For Target group name, type a name for the target group.

  5. (Optional) For Protocol and Port, modify the default values as needed.

  6. For Target type, select instance to specify targets by instance ID or ip to specify targets by IP address.

  7. For VPC, select a virtual private cloud (VPC).

                        The Create target group dialog box.
  8. (Optional) For Health check settings and Advanced health check settings, modify the default settings as needed.

  9. Choose Create.

  10. (Optional) Add one or more tags as follows:

    1. Select the newly created target group.

    2. On the Tags tab, choose Add/Edit Tags.

    3. On the Add/Edit Tags page, for each tag you add, choose Create Tag and then specify the tag key and tag value. When you have finished adding tags, choose Save.

  11. (Optional) To add targets to the target group, see Register Targets with Your Target Group.

To create a target group using the AWS CLI

Use the create-target-group command to create the target group, the add-tags command to tag your target group, and the register-targets command to add targets.