Search code examples
amazon-web-servicesamazon-ecs

AWS ECS - Deploying two different microservices in a single ECS


I have two microservices that need to be deployed in the same ECS service for efficient resource usage.

Both of them have the same context path so cannot use path-pattern filter in the ALB and ECS doesn't seem to allow multiple ALB's in a single ECS.

Is it possible to have two target groups serving the micro services at different ports ? Or is there any other solution ?


Solution

  • Yes you can have two different Target groups each with a unique Port under the same ALB. I use this construction to support HTTP and HTTPS protocol on the same instance with ALB. Should be the same for ECS