I have a use case in which I have to enable path base routing according to EC2 instance id in ALB.
Suppose I have abc.com/node=i-085aba4d8dxxxxx36
. The traffic should be directed to the target group which contains the particular node present in the URL (i-085aba4d8dxxxxx36
). Since there is autoscaling enabled the instance id will change so I cannot set direct rules in the Load Balancer to route the traffic to a particular Target Group.
Is there any way by using Lambda function to direct traffic to a particular Target Group or some other options to deal with it?