In this recipe, we will learn how to create a target group. The application load balancer and network load balancer route traffic to target groups, unlike classic load balancers, which route traffic to individual EC2 instances.
Creating ELB target groups
Getting ready
We need to create two EC2 instances to complete this recipe. We can do this by following the Using EC2 user data to launch an instance with a web server recipe in Chapter 6, Working with EC2 Instances, but using EC2 user data, as we used in the Getting ready section of the Creating a classic load balancer recipe of this chapter.
Add name tags (tags with Key set to Name) for the instances to identify them from the instances list. For the first instance, set...