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]: Document stopped-task fields of `ECS Task State Change` events and update `aws.ecs@ECSTaskStateChange` · Issue #2907 · aws/containers-roadmap

[ECS] [request]: Document stopped-task fields of ECS Task State Change events and update aws.ecs@ECSTaskStateChange #2907

New issue
Copy link
New issue
Copy link
Open
Open
[ECS] [request]: Document stopped-task fields of ECS Task State Change events and update aws.ecs@ECSTaskStateChange#2907
Copy link
Assignees
AbhishekNautiyal
Labels
ECSAmazon Elastic Container ServiceFargateAWS Fargate

Description

@garysassano
garysassano
opened on Nov 8, 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, 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

Document the fields of an ECS Task State Change event for a stopped task, and bring the aws.ecs@ECSTaskStateChange schema in the EventBridge schema registry up to date with the events ECS sends.

Which service(s) is this request for?

ECS, Fargate, and the EventBridge schema registry's aws.events registry.

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

A common pattern is an EventBridge rule on stopped tasks that sends each event to a Lambda function, which reads why the task stopped and alerts on it or records it. Validating that payload needs to know which fields a stopped task's event has, and the three sources disagree:

  • Task state change events: both example events are RUNNING tasks, so no stopped-task field appears.
  • Registry schema: aws.ecs@ECSTaskStateChange, version 2, last modified 2026-07-08.
  • Real events: 7 stopped-task events captured on 2026-11-08 in eu-central-1, from Fargate tasks (platform version 1.4.0, ARM64, launchType: FARGATE).

Fields

Field Docs examples Registry schema Real stopped-task events
stopCode, stoppedReason, stoppedAt, stoppingAt, executionStoppedAt Not shown Optional All 7
containers[].exitCode Not shown Optional Only when the container started
enableExecuteCommand, ephemeralStorage Shown Missing All 7
capacityProviderName Shown Missing None (launched with launchType)
computeId Not shown Missing All 7, a 32-character hex string

computeId isn't documented anywhere I could find: not on the events page, not in the Task data type of the API reference, and DescribeTasks doesn't return it for the same task.

Stopped reasons

Both test tasks below stopped with stopCode: TaskFailedToStart, and neither container has an exitCode.

Failure Docs Real stoppedReason on Fargate
Image tag doesn't exist Category CannotPullContainer; every other category ends in Error CannotPullContainerError: pull image manifest has been retried 7 time(s): failed to resolve ref <image>: <image>: not found
Secret doesn't exist Fetching secret data from AWS Secrets Manager in region <region>: secret <arn>: ResourceNotFoundException: Secrets Manager can't find the specified secret. ResourceInitializationError: unable to pull secrets or registry auth: execution resource retrieval failed: unable to retrieve secret from asm: service call has been retried 1 time(s): failed to fetch secret <arn> from secrets manager: operation error Secrets Manager: GetSecretValue, https response error StatusCode: 400, RequestID: <id>, ResourceNotFoundException: Secrets Manager can't find the specified secret.

So on Fargate, a missing secret falls under the ResourceInitializationError category, not ResourceNotFoundException. I only tested Fargate; the documented message may be what the container agent on EC2 reports.

What would help

  1. A stopped-task example on the events page, and a list of the event's fields with their types and when each one is present.
  2. computeId documented, or left out of the event if it's internal.
  3. The registry schema updated with computeId, enableExecuteCommand, ephemeralStorage, and capacityProviderName.
  4. The error message pages showing the message for each launch type, and the CannotPullContainer category named as it appears in the stopped reason.

Are you currently working around this issue?

By capturing real events, writing a schema by hand from them, and making every field optional unless the registry requires it.

Additional context

The test tasks were one-off Fargate tasks: one with an image tag that doesn't exist in Amazon ECR Public, and one whose task definition references a Secrets Manager secret that doesn't exist, with an execution role allowed to read it. The other five events came from a service whose container exits with code 1.

A Powertools for AWS Lambda (TypeScript) feature request for a Parser schema of this event depends on the same field list: aws-powertools/powertools-lambda-typescript#5927.

Activity

  1. mikestef9
    added
    ECSAmazon Elastic Container Service
    FargateAWS Fargate
    on Nov 9, 2026
  2. herrhound
    assigned
    AbhishekNautiyal
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @AbhishekNautiyal
    AbhishekNautiyal

Labels

ECSAmazon Elastic Container ServiceFargateAWS Fargate

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.