Reputation: 321
It was only recently that I began working on AWS , and I had been trying out AWS application load balancers
I have two target groups each with EC2 instances with index.html pages routed at /index.html.
I created an AWS application load balancer , connected to those two target groups.
However when I tried to do Path Based Routing on the ALBs and tried to access those paths all I got was a 404 error
I have tried the following rules individually and together.
The default target group however is working , and all the target groups have healthy instances.
Upvotes: 1
Views: 2872
Reputation: 769
The instance in TG2
will need to have a page at /tg2
, as that is the path being requested.
You do not need the 'Http header' rule for path based routing, as your existing Path rule should cover this. In addition, this rule does't make sense - there is no HTTP header named GET
.
Upvotes: 1
Reputation: 59
Before you going to enable Path based routing make sure to check that path is available in your all EC2 instances, and then modify the health checks as same as your path. Ex : If I wanted to connect to /user.html instead of /index.html
Upvotes: 2