amazon-web-servicesdockerrabbitmqamazon-ecsamazon-mq

How to manage ECS docker instance, zéro to N with Amazon MQ queues


in the context of batch and microservices.

I don't want use AWS Lambda with the problem of constructor lock.

However, my team don't want start ECS docker instance if no batch is running. I am looking for any solution, with an instance docker all time running, with Saga orchestrator inside. Saga send message in rabbitMQ. After if one message is waiting inside queue, an instance of consumer is started. After the end of process, if no new message inside queue after one hour the instance is stopped.

Have you solution in AWS context ?

Thanks


Solution

  • I believe you could do auto-scaling on the ECS service with the MQ MessageReadyCount metric as the auto-scaling metric.