I’d like to know how to use a single ALB to spread traffic across a combination of existing on-premises resources (IPs) and new resources running in the AWS Cloud (EC2 instances).
Both on-prem and VPC resources deploy the same Web Application, so I don’t think we can use path-based rule in the listener.
The EC2 instances are created using ASG, so we need to use "instance" type of Target Group for the VPC resources.
And this document shows how to register multiple target groups with your ELB.
However, I think you may need multiple ALBs and handle the traffic routing to each ALB with DNS.
Two ALBs is needed:
one associate with "instance" type of target group (to support ASG)
another associate with "ip" type of target group (to support on-prem servers)
Thanks for the response, I agree with your conclusion that I need multiple ALBs.
I had read the first link, but it does not have any details. The second link is about ECS.