Background
- Current State: I currently have a nlb that routes to an nginx server running on an ec2 instance.
Goal
- I am trying to replace the nginx ec2 instance with a fargate service that runs nginx.
- I would like to keep the current nlb and set the fargate cluster as the target group for the existing nlb.
Problem
- according to aws documentation, aws ecs fargate cluster service supports loadbalancing with nlb or alb: https://docs.aws.amazon.com/AmazonECS/latest/userguide/service-load-balancing.html
- when I try to deploy the nginx task, in the load balancing section, there is only an option to select an existing alb or create a new alb.
- I tried changing the task protocol to TCP and UDP--regardless of the protocol, when I try to deploy the task as a service, the only load balancer option is still application load balancer.
Question
- How do I load balance to a fargate cluster service task using an nlb? Am I missing a specific setting somewhere?
- If you cannot set the fargate cluster as a target group for an nlb directly, would it be reasonable to route traffic from an nlb to an alb and then set the alb target group as a fargate cluster?
