I am running two distinct applications, each with context paths 'app1' and 'app2,' on Amazon EC2 instances that do not have public IP addresses (EC2 instances are created as part of ECS cluster with EC2 launch type). To manage incoming traffic, I have set up an internal Application Load Balancer (ALB) that performs context path-based routing across multiple target groups. Other than the mentioned context paths, I don't have any application running on the root context path "/".
When I SSH into one of the EC2 instances and make a CURL request using the ALB's DNS name, everything works as expected. However, I am now seeking guidance on how to configure an Internet-facing Network Load Balancer (NLB) to effectively route traffic to this internal ALB.
My goal is to make these applications accessible via the internet by directing traffic through the NLB while preserving the context path-based routing performed by the internal ALB. Any assistance on the configuration steps and best practices for achieving this would be greatly appreciated.