I'm trying to figure out the best way to go about having 2 separate APIs on the same ECS cluster.
I'm not sure if this is the best way to go about it or if I should have a separate ECS instance.
For the current configuration.
- ECS Service is running with a task that deploys a Docker image running NodeJS
- A Network Load Balancer is attached to the ECS instance
- API Gateways is configured as a proxy with a VPCLINK which connects to the network load balancer
- Docker Image is set to port 80
Now I want to add a second API and I want to open it to Port 81
I created a separate service which runs a task for another docker image
I attached the same network load balancer and added a listener for port 81
I then went to setup the API Gateway for this second API and I wasn't sure how to point it to the right port.
As reference, this is the tutorial I used to setup API Gateway: https://manurana.medium.com/tutorial-connecting-an-api-gateway-to-a-vpc-using-vpc-link-682a21281263
I've also attached the architecture and the ECS service is created under the private subnets.
Thanks for the reply! I was leaning towards this approach but I needed some confirmation that it was the right idea. Thanks for providing the information!