We deploy our batch processes to ECS Fargate by pushing a new container, and then forcing a deployment on the service. This does not allow us to do a graceful shutdown in the current running tasks which are working jobs. We do a force deployment because at some point recently, just having the task restart through a container shutdown does not pull a fresh image.. (We are able to signal the current running tasks so they will exit when finished with their workload)
So I think looking for advice on how best to provision a new task (and service?) for the new container image and allow the current task to finish gracefully, but not be restarted when done.
We automate this through Bitbucket pipelines via AWS CLI commands.