aws / aws/containers-roadmap

[Fargate] [request]: Support for terminating a Task only after all containers have stopped

Open
#1,085 0 comments 0 reactions 0 assignees View on GitHub
ECS Fargate Proposed
Dominant language
Shell
Stars
5.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

**Tell us about your request**

To support game servers hosted in multiple containers within a single Task, it would be useful to support Task termination only after all the containers have stopped (instead of the essential containers functionality). This would allow running stateful sessions on multiple containers of the same type and recycle the Task once all the containers have stopped.

**Which service(s) is this request for?**

Fargate / ECS

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**

Currently to synchronize the termination of multiple stateful containers, you need to make sure all of them marked essential (one or all for example), wait for the termination of the other containers. The idea would be to have a Fargate Task host 10 game sessions on 10 game server containers and terminate once all of them are done (to rotate for new fresh Tasks).

**Are you currently working around this issue?**

Yes, I have all of the containers marked as "essential" and will wait in the processes until all other containers are done (by checking the status with a Lambda function)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Fargate/ECS task lifecycle and the current essential-container termination behavior described in the request. Compare it with the stated Lambda workaround and define how a task should terminate only after every container has stopped. Done means the requested all-container termination behavior is supported without requiring every container to be marked essential.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.