[ECS/Fargate] [feature]: Generate ECS Events on primary container health status
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
Currently ECS Events are generated for [Task state change events](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_cwe_events.html), which can be consumed by Lambda (for ex.) and perform additional task - eg. update external Service Discovery. However, after the addition of [Container Health Checks](https://aws.amazon.com/about-aws/whats-new/2018/03/amazon-ecs-supports-container-health-checks-and-task-health-mana/), we get an additional `HealthStatus` for a task.

It would be very useful to get events generated on this status change so we can react on change even quicker.
Additionally, it would be useful to add this status to the existing Events generated eg. in _Task state change events_
### 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**
What do you want us to build?
**Which service(s) is this request for?**
This could be Fargate, ECS
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
What outcome are you trying to achieve, ultimately, and why is it hard/impossible to do right now? What is the impact of not having this problem solved? The more details you can provide, the better we'll be able to understand and solve the problem.
**Are you currently working around this issue?**
Currently we are using a combination of `desiredStatus` and `lastStatus` to figure out whether or not to disable it in Service Discovery(Eureka). If the healthStatus was available, that could be used instead
**Additional context**
Anything else we should know?
**Attachments**
If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)
Contributor guide
Research direction
Start with the linked ECS task state change events and container health check documentation. The request is for ECS/Fargate to emit events when primary-container health changes and to include health status in existing task state change events. Done means both event behavior and the additional status are available for consumers.
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
- 25/100