[ECS] [Feature Request]: Propagate Tags and/or Overrides to EventBridge
- 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**
We currently use Overrides to provide metadata to containers when using start_task() (boto3) AND to assess usage of our SaaS platform, which is based on container start/stop times. We currently track the following events in EventBridge:
```json
{
"detail-type": ["ECS Task State Change", "ECS Container Instance State Change", "ECS Deployment State Change"],
"source": ["aws.ecs"],
"detail": {
"clusterArn": ["arn:aws:ecs:::cluster/-dev"]
}
}
```
We use these to extract a `TENANT_ID` from the container overrides to insure we process and store the usage on a per tenant bases.
Recently we have integrated start_service(). Start Service does not support adding overrides, so we started to use tags to get the metadata into the container, however tags are not propagated to the EventBridge.
**Which service(s) is this request for?**
ECS, EventBridge
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
To solve the problem without this data being propagated, for load testing (sometimes running 1000s of containers for 1-2 hours), we would need to create an additional store for the data we need. This would likely be the taskArn, extracted in the container and stored with the TENANT_ID (extracted from Overrides for a task, or tags for a service/task).
At the point of receiving the message in EventBridge that contains the right start/stop data, we'd need to perform a lookup on the store to be able to provide the TENANT_ID (or any other meta) to the function we use that creates a billing entry.
For us, the billing is based upon the per-minute usage of the container. Our application uses plenty of other services, both internal and external to AWS, which means it creates a simple way to provide a true per-minute cost to our customers, based on the simple usage time of the task - this is not a web application.
**Are you currently working around this issue?**
No, on discovery this feature request has been raised, but it's likely we'll have to build around it to preserve timelines for our bigger customers using our load testing features.
**Additional context**
Alternatively, start_service() could support propagating/adding overrides, for example TENANT_ID doesn't change for the duration of the service.
**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
Assessment
This issue has not been assessed yet.