I have a micro-services application that I am deploying to AWS using ECS Fargate. Most of the containers can be deployed as long running tasks in a service. However, I need to spin up new containers as and when I receive JSON messages over a ZMQ REQ/REP port. These containers need to be spin up and need to run as long running ECS tasks.
How do I dynamically launch such AWS Tasks?How does the Service monitor such tasks?
I tried researching the internet and people are mentioning AWS Batch but my use-case is a bit different as I want this dynamically launched task to be a long running task similar to the tasks in an ECS service.