Let's use Python because... Python. Every container will startup and immediately execute a run_mldeploy.py file (or some other suitable name). This file needs to:
- Get the SQS queue name
- Forever loop through polling the queue for a single job and then:
- executing that job if found, then deleting the job from the queue upon completion
- waiting some time (10s, 30s, 5 minutes?) then polling again
- If something interrupts this flow and causes an exit, the instance needs to be reported as unhealthy so a new one can replace it and start working.
Custom health status: https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html
Let's use Python because... Python. Every container will startup and immediately execute a
run_mldeploy.pyfile (or some other suitable name). This file needs to:Custom health status: https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html