Registering Targets
Learn to register targets with the load balancer.
We'll cover the following
The next step is to register targets with the target group. This assigns targets (WordPress instances in our case) to the target group so the load balancer can later address them all together.
The elbv2 register-targets
command needs the following parameters:
--target-group-arn
to specify the target group.--targets
to specify the targets (our WordPress instances). To specify instances, we can use theId=<instance id>
syntax. Other options instead ofId
areip
for an IP address,lambda
for an AWS Lambda function (we will not cover those), andalb
for another load balancer (an Application Load Balancer to be precise).
We can list multiple targets separated by a space, so it looks like this:
Get hands-on with 1400+ tech skills courses.