0

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?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
niksaw
  • 1
  • 1
  • 1
    Why do you wish to refer to an EC2 Instance ID in a URL? Can you tell us more about your _actual_ objective? Why does a normal Listener Rule not satisfy what you are wanting to achieve? – John Rotenstein Nov 11 '22 at 10:25
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Nov 11 '22 at 13:24
  • Self hosted Jira is running on AWS EC2, If there is some issues in Jira nodes it would be easy to debug if we can directly login into a particular node, currently we have to open Jira again and again on incognito to get into particular node. I know it's a strange use case, but is there a way to achieve this? – niksaw Nov 11 '22 at 13:41
  • I'll clarify what I need, there is one ALB and multiple Target groups, in special scenario that is when we receive abc.com/instance_id we have to redirect that to particular Target group where that instance is present. – niksaw Nov 11 '22 at 13:43

0 Answers0