aws / aws/containers-roadmap

Allow specifying slots for ECS services that have a desired count more than 1 - allowing tasks to differentiate themselves

Open
#1,751 0 comments 3 reactions 0 assignees View on GitHub
ECS 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**
It would be useful if we could worker "Slots" with ECS services where an ECS service has a task count > 1. So that each task in the service behaves very slightly differently. eg one changed environment variable, with the value supplied from a pre-defined set and, very importantly, only one task per value running at any time.

I have read that Kubernetes supports defining something like this

A similar feature in ECS might allow you to define a set of 100 directory names, even if they are just named `{1, 2, 3, ...}`, and then defining a service that would keep one task running per directory.

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

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
Sometimes stateful worker tasks are unavoidable. This can be managed by giving each task its own directory on EFS, thus ensuring that each task can pick up where it left off. AFAIK doing this for 100 identical worker tasks would require 100 task definitions and 100 services. Besides looking a mess, this reduces the usefulness of ECS deployment features forcing deployments to be executed one service at a time.

Tasks can't create new directories every time they start or they will lose where a previous task left off. Tasks can't operate out of the same directory as this can/will generate conflicts and corruption.

**Are you currently working around this issue?**
There's nothing for it, we just need to create a **_lot_** of services.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the ECS service request and its stated EFS-based worker use case. Done would mean ECS can keep one task running for each value in a predefined slot set, provide the corresponding value to each task, and avoid requiring separate services for every worker.

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
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.