Skip to content

MaxInstanceLifetime value for ECS Fargate

2

My team uses AWS ECS Fargate. We would like to perform a routine recycle for our ECS tasks. I found the MaxInstanceLifetime value parameter but it seems mostly for EC2 instances. Is it possible to set this parameter for ECS Fargate? If so, where in the console can I find this? If not, are there any suggestions on how we can go about recycling our ECS Fargate tasks?

Docs:

asked 5 years ago2.4K views

2 Answers
1
Accepted Answer

One option is to use update service API call, and --force-new-deployment flag.

MaxInstanceLifetime does not apply for Fragate.

answered 5 years ago

0

Create a sidecar container with sleep XXX and mark it as essential

answered 4 years ago

  • This is a bad idea if you are running a critical service as all tasks in your service will fail at the same time resulting in downtime until a new set of tasks is launched.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.