Now that we have our API Gateway injecting the header, the next piece to look at is the ALB which will be using this header to route traffic to each of our stacks. To view the ALB that was provisioned for our environment, navigate to the EC2 service in the AWS console and select the “Load Balancers” item from the menu on the left of the page (you may have to scroll down to find this menu item). The next step is to locate the ALB in the list of ALBs. Select the box next to the “saas-svs-wrkshp-lab2-us-east-1”. The page should appear similar to the following:
With this item selection, you can now select the “Listeners” tab from the bottom of the page to view the listeners associated with this ALB. Now, the expectation here is that we would have seen routing rules in this listener list that would apply the X-TENANT header we injected in the API Gateway to route traffic to the appropriate target group. However, there are no routing rules defined for this ALB. Why is that? It’s because we haven’t actually registered any tenants. This rules only get added during the provision of each new tenant silo. We’ll circle back here after we provision some tenants to see how that changes the configuration of our ALB.