GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [ECS] [request]: Task-set-aware ECSServiceAverageCPUUtilization (or option to exclude non-primary task sets) for CodeDeploy blue/green · Issue #2925 · aws/containers-roadmap

[ECS] [request]: Task-set-aware ECSServiceAverageCPUUtilization (or option to exclude non-primary task sets) for CodeDeploy blue/green #2925

New issue
Copy link
New issue
Copy link
Open
Open
[ECS] [request]: Task-set-aware ECSServiceAverageCPUUtilization (or option to exclude non-primary task sets) for CodeDeploy blue/green#2925
Copy link
Labels
ECSAmazon Elastic Container ServiceProposedCommunity submitted issue

Description

@nageshvinnakota
nageshvinnakota
opened on Nov 21, 2026
Issue body actions

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments — use reactions instead
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request

Add a task-set-aware variant of ECSServiceAverageCPUUtilization (or an option to exclude non-primary task sets from the existing metric) so that Application Auto Scaling target tracking remains reliable for ECS services using AWS CodeDeploy blue/green deployments with a non-zero TerminationWaitTimeInMinutes.

Which service(s) is this request for?

Amazon ECS (Fargate and EC2 launch types), Application Auto Scaling, AWS CodeDeploy (blue/green)

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?

When an ECS service is deployed with CodeDeploy blue/green and TerminateBlueInstancesOnDeploymentSuccess.TerminationWaitTimeInMinutes > 0, the old (blue) task set remains running but idle for the entire wait window (often hours for safe rollback).

ECSServiceAverageCPUUtilization is calculated across all tasks in the service (docs). Idle blue tasks inflate the denominator while contributing almost nothing to the numerator, so the reported utilization is significantly lower than what the traffic-serving (green) tasks are actually experiencing.

Result: CPU-based target-tracking policies frequently fail to scale out during the termination-wait window even when the active stack is under clear load.

This is expected behavior given the current metric definition, but it creates a practical gap for any team that combines two AWS-recommended patterns:

  1. CodeDeploy blue/green with a realistic termination wait for fast rollback
  2. Application Auto Scaling target tracking on ECSServiceAverageCPUUtilization

AWS Support confirmed the mechanism (reported utilization roughly 2× lower when blue tasks are idle and task-set sizes are equal) and filed an internal feature request from the associated support case. There is currently no committed timeline.

Are you currently working around the issue?

Yes. Practical mitigations include:

  • Scaling primarily on ALB RequestCountPerTarget via a custom Metric Math expression that takes MAX() across the blue and green target groups (so the idle target group does not suppress the signal)
  • Keeping a CPU-based policy as a secondary safety net
  • Optionally lowering the CPU target to compensate for dilution (with the drawback that the lower target also applies outside the wait window)
  • Shortening TerminationWaitTimeInMinutes where rollback requirements allow

These work but add operational complexity and still leave CPU-based scaling unreliable for the duration of the wait window.

Full public write-up with root-cause analysis, AWS confirmation, and recommended mitigations:

https://repost.aws/questions/QU7ajCrh3ZQxya5PNsZDWnSg

Requested enhancement

One or both of:

  1. A task-set-aware / primary-task-set-only variant of ECSServiceAverageCPUUtilization
  2. A configuration option (service-level or metric dimension) to exclude non-primary task sets from the existing service-level utilization calculation

Either would restore a reliable CPU-based scale-out signal for the standard single-service CodeDeploy blue/green pattern without forcing customers to split into two services or abandon CPU target tracking.

Thank you for considering this request.

Activity

  1. nageshvinnakota
    added
    ProposedCommunity submitted issue
    on Nov 21, 2026
  2. mikestef9
    added
    ECSAmazon Elastic Container Service
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ECSAmazon Elastic Container ServiceProposedCommunity submitted issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.