[ECS/Fargate] [request]: ACTIVATING/DEACTIVATING task state events not triggered for service with single target group
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
According to: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle.html, the ACTIVATING and DEACTIVATING states are defined as follows:
```
ACTIVATING
Amazon ECS has to perform additional steps after the task is launched but before the task can transition to the RUNNING state.
For example, for tasks that have service discovery configured, the service discovery resources must be created.
For tasks that are part of a service that is configured to use multiple Elastic Load Balancing target groups,
the target group registration occurs during this state.
DEACTIVATING
Amazon ECS has to perform additional steps before the task is stopped.
For example, for tasks that are part of a service that is configured to use
multiple Elastic Load Balancing target groups, the target group deregistration occurs during this state.
```
Note the mention of `multiple Elastic Load Balancing target groups`.
I have tested the following scenarios and observed the state change events to (ACTIVATING/DEACTIVATING):
1. Service registered to Cloudmap (✅ events triggered regardless of target groups attached to the service)
2. Service registered to **multiple target groups** (✅ events triggered)
3. Service registered to **single target group** (❌ events not triggered)
This is according to documentation as it mentions `multiple target groups` explicitly! However, I do not understand why it is so?
Isn't `2` and `3` above same?
Use case:
We are evaluating Fargate and the to AppMesh and during the transition there will be multiple services registered to cloudmap and eureka. We want to update an external service registry(Eureka) as soon as these events are triggered
### 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
Contributor guide
Research direction
No repository files, tests, or implementation entry points are identified; start by reviewing the linked ECS task lifecycle documentation and the reported single- versus multiple-target-group behavior. Done would require a maintainer-confirmed explanation or a defined change that makes ACTIVATING and DEACTIVATING events consistent for single target groups.
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
- Needs clarification
- Newbie friendliness
- 20/100