How to configure AWS load balancer to forward to external IP address

amazon-web-servicesload balancing

I currently have multiple instances of the same web application running on different instances by different vendors (AWS, Digital Ocean, Vultr). Each application instance run on their own port numbers.

I wish to configure AWS Applilcation/Network Load Balancer such that it will forward the requests to these endpoints:

Client — HTTP Request –> Domain Name –> AWS Load Balancing Endpoint (IP Address?) –> Load Balancer rules –> Instances on AWS / Digital Ocean / Vultr.

Is there a way to do the above?

Best Answer

AWS Application Load Balancer’s Target Group can have either EC2 instance or IP address targets. In your case you need to use the IP address targets.

Here are the instructions: Application Load Balancing to IP Address

These addresses can be in the same VPC as the ALB, a peer VPC in the same region, on an EC2 instance connected to a VPC by way of ClassicLink, or on on-premises resources at the other end of a VPN connection or AWS Direct Connect connection.