- Newest
- Most votes
- Most comments
An easy first place to look would be the path in your listener rule. From how you've describe it, it's correctly formed and satisfies the below, but no harm in parsing it to double- and triple-check https://repost.aws/knowledge-center/elb-achieve-path-based-routing-alb
Note: Path-based routing rules look for an exact match. In this example, path-based routing uses the path definitions /svcA and /svcB. If your application requires requests to be routed further down these paths, for example, /svcA/doc or /svcB/doc, then include a wildcard when you write the condition for the path-based routing rule. Use path patterns similar to /svcA* or /svcB* to be sure that any documents on these paths are accounted for when routing requests.
Beyond that, you probably already know that a 502 error means that your load balancer got an invalid response back from the backend. Enable access logging to generate more detail https://docs.aws.amazon.com/elasticloadbalancing/latest/application/enable-access-logging.html
This knowledge docuent is very thorough about what else to try https://repost.aws/knowledge-center/elb-alb-troubleshoot-502-errors
Relevant content
- asked 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
Thank you for answering this.
So, lets suppose in assets service, I have 2 APIs 1.2.3.4:8081/cars 1.2.3.4:8081/scooters
and, in my user service, I have 2 APIs 1.2.3.4:8080/customers 1.2.3.4:8080/users
I have added 2 rule: If path is /user/* -> forward to user service If path is /assets/* -> forward to assets service
Now, I am calling endpoints as below: https://api.com/user/users https://api.com/user/customers https://api.com/assets/cars https://api.com/assets/scooters
But I am getting something like following: Cannot GET /user/users
interesting thing is that, when I hit: https://api.com/users
It calls the /users API.
Can you please assist me to sort out the issue.