How do I achieve path-based routing on an Application Load Balancer?
Last updated: 2021-01-08
I'm running several microservices behind my Application Load Balancer. How do I forward requests to specific target groups based on the URL path?
Resolution
In an Application Load Balancer, you can create a listener with rules that forward requests to target groups based on the URL. For instructions, see Add path-based routing. For more information on path patterns, refer to the "Path conditions" section of Rule condition types.
Note: Before creating a load balancer that uses path-based routing:
- Launch your Amazon Elastic Compute Cloud (Amazon EC2) instances in a virtual private cloud (VPC).
- Confirm that security groups in your Amazon EC2 instances allow access on the listener port and health check port.
- Confirm that your microservices are deployed on the Amazon EC2 instances that you plan to register.
Related information
Did this article help?
Do you need billing or technical support?