aws / aws/containers-roadmap

Container Insights: publish per-task metrics for ECS Fargate tasks (TaskId dimension)

Open
#2,843 0 comments 1 reaction 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

Currently, Container Insights for ECS Fargate publishes CloudWatch metrics only at the TaskDefinitionFamily level (aggregated across all running tasks of the same family). There is no way to retrieve CPU, memory, or network metrics for an individual task using the TaskId dimension.

Use case:

We run multiple concurrent Fargate tasks from the same task definition (email migration jobs). Each task processes a different user's mailbox and we need to display per-task resource utilization in our monitoring dashboard. Since all tasks share the same TaskDefinitionFamily, the aggregated metrics are useless for identifying which specific task is consuming resources or experiencing issues.

Current behavior:

Querying GetMetricData with dimensions ClusterName + TaskDefinitionFamily → returns aggregated data across all tasks ✓
Querying GetMetricData with dimensions ClusterName + TaskId → returns no data ✗
Expected behavior:

Container Insights should publish metrics with a TaskId dimension (in addition to the existing TaskDefinitionFamily dimension), so users can query CPU, memory, and network usage for individual Fargate tasks.

Workaround:

We currently divide the aggregated metrics by the number of running tasks, which is an inaccurate approximation when tasks have different workloads.

Impact:

This limitation affects any architecture that runs multiple concurrent Fargate tasks from the same task definition and needs per-task observability — a very common pattern for job queues, batch processing, and parallel workloads.

Contributor guide

Open the contributing guide

Research direction

No repository files, tests, or entry points are named. Start by reviewing the described CloudWatch GetMetricData queries and existing Container Insights metric dimensions; done means individual ECS Fargate CPU, memory, and network metrics can be queried with ClusterName plus TaskId.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.