AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

How to use ALB to spread traffic to both VPC and on-prem servers

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.

2 Answers

I think this blog post describes exactly what you need for the on-premises 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.

Henry Liu

Thanks for the response, I agree with your conclusion that I need multiple ALBs.

Henry Liu

I had read the first link, but it does not have any details. The second link is about ECS.

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)

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?