Too Long; Didn't Read
Recently, I built a lightweight task scheduler on top of <a href="https://aws.amazon.com/ecs/" target="_blank">AWS ECS</a> in Go. The application schedules batch jobs with custom arguments and schedules as single containers via AWS ECS, an orchestrator built on top of EC2 and Docker. One of the key requirements of the scheduler is monitoring the status of actively running tasks. For this, I chose to use AWS ECS’s <a href="http://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html" target="_blank">DescribeTasks</a> endpoint, which takes ECS task ID(s) and returns their status, exit code if complete, reason for stopping, etc.