A Fargate cluster will automatically hibernate when there are no more jobs, but an EC2 cluster will not. A hibernate function should be callable on an active deployment, and should trigger:
- EC2: ASG desired instances set to zero.
- Fargate: If jobs are still running, set desired tasks to zero in service.
This should be effective regardless of the SQS still having jobs or not.
Additionally, a resume or thaw or wakeup function is required to restart the execution again. This is functionality will likely come in handy so users don't have to undeploy and redeploy the same deployment everytime they need to take a break.
A Fargate cluster will automatically hibernate when there are no more jobs, but an EC2 cluster will not. A
hibernatefunction should be callable on an active deployment, and should trigger:This should be effective regardless of the SQS still having jobs or not.
Additionally, a
resumeorthaworwakeupfunction is required to restart the execution again. This is functionality will likely come in handy so users don't have toundeployandredeploythe same deployment everytime they need to take a break.