Is there any to automatically refresh the tasks of a service on a schedule (every day, every week, etc..)? Semi-officially, it seems like there may not be (and maybe it's just up to the individual processes to shut themselves down):


A task can be scheduled for retirement in the following scenarios:

  • AWS detects the irreparable failure of the underlying hardware hosting the task.

  • Your task uses the Fargate launch type and is running on a platform version that has a security vulnerability that requires you to replace the tasks by launching new tasks using a patched platform version.

1 Answer 1


What you linked is when AWS retires tasks (for the reasons mentioned). However if you as a user wants to "refresh" your tasks and you don't have a new version of your task to be deployed (e.g. maybe because your change your image for a new app version deployment) you still have the option to force the redeployment of your service using the update-service API using the --force-new-deployment option.

Why would you want to do that out of curiosity?

  • They don't restart when you push a new image (and the task-definition is just tied to latest). It'd be nice if there were just a policy or scheduling mechanism that can handle a redeployment. Otherwise, we're ironically having to schedule an ECS task to do this for us. May 29, 2021 at 2:02
  • First, you should not use latest to deploy (in production). If you use latest and your service needs to scale out you would have different versions of your code running in your service. You should always use a tag that represent a specific build. Regardless of the tag you use, there is no automated mechanism to redeploy a service. This is something you need to configure in a pipeline. See this for more details.
    – mreferre
    May 29, 2021 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.