AWS ALB endpoint returns 404

Viewed 2137

I have an interesting situation going on right now.

IF                                        THEN
Host is example.com                       Forward to:
Path is /abc?/*                           <load balancer URL1>

IF                                        THEN
Host is example.com                       Forward to:
Path is /*                                <load balancer URL1>

There are two target groups and both of them are healthy. When I try to hit example.com/abc1/something-> this works with no issue. But, When I try to hit <load balancer URL1>/abc1/something-> this throws 404 error.

Q1: How does example.com/abc1/something is working if the load balancer is failing.

Q2: Few endpoints are just not working and returning 504 errors even though target groups are healthy.

1 Answers

Based on the comments.

The example.com/abc1/something is working but default alb dns is failing, because the listener rules are set to respond to Host equal to example.com. However, default ALB dns has different host value, thus the given rule will not match ALB dns.

Related