Skip to content

fix(tagging): GetResources reports no ECS service, task or task definition (part of #835) #935

Closed

Description

@scttfrdmn

The defect

GetResources reports an ECS cluster and nothing else in the ecs namespace.
scanECSClusters (emulator/tagging_plugin.go:559) is the only ECS descriptor
(:251), while ecsTagStateKey (emulator/ecs_plugin.go:1221) resolves four ECS ARN
shapes — cluster, service, task and task definition — and mergeResourceTags' ecs arm
writes tags to all four through ecsMergeRecordTags.

So a tag written to a service, a task or a task definition through TagResources is
readable through ECS's own ListTagsForResource and invisible to a caller discovering
resources
. That is the asymmetry each of #835's other nine rows closed with its scanner,
and it is the last piece of that issue: criterion 1 (a mergeResourceTags arm) and
criterion 2 (readable through the owning service) are met for all eleven types;
criterion 3 (GetResources reports the tag) is met for nine.

A task is in scope alongside the two rows #835 names. ecsTagStateKey reaches one,
and AWS's ECS tagging page lists tasks first among the resources that support tags —
"There are multiple ways that Amazon ECS tasks, services, task definitions, and clusters
are tagged". So this is three descriptors, not two.

Verified

From Tagging Amazon ECS
resources
,
the Tagging support for Amazon ECS resources table: tasks, services, task definitions and
clusters all read Supports tags: Yes (as do task sets, container instances, external
instances and capacity providers, none of which substrate models). "A maximum of 50 tags
can be associated with a resource."

From API_GetResources:
"Returns all the tagged or previously tagged resources that are located in the specified
AWS Region
for the account", and ResourceTypeFilters takes service[:resourceType]
where "The string for each service name and resource type is the same as that embedded in a
resource's Amazon Resource Name (ARN)" — so the filters are ecs:cluster, ecs:service,
ecs:task and ecs:task-definition. The tagging guide's welcome page, which
API_TagResources names as authoritative, states that "The GetResources, GetTagKeys,
and GetTagValues operations support all resource types".

Scope

The state keys the scanners enumerate already exist and are account- and Region-qualified
(emulator/ecs_plugin.go:109-143):

Type Key ARN member
service service:{acct}/{region}/{cluster}/{name} ECSService.ServiceArn
task task:{acct}/{region}/{cluster}/{id} ECSTask.TaskArn
task definition taskdef:{acct}/{region}/{family}/{revision} ECSTaskDefinition.TaskDefinitionArn

Each collides with a sibling index key under a bare-prefix test — service_names:,
task_ids:, taskdef_families:, taskdef_revisions: — so the prefixes are tested
colon-terminated, which is now the default for a new row (six namespaces have collided).

The four ECS scanners become Region-scoped. scanECSClusters prefixes by account only,
so a caller in us-west-2 is reported a us-east-1 cluster, contradicting the sentence
quoted above. It is fixed here rather than left for the wider audit, because a service
whose clusters answer cross-Region and whose services answer same-Region gives one caller
two different answers about the same namespace. The same defect in fourteen other scanners,
and a cross-account variant in three, is a separate issue.

Acceptance criteria

Activity

  1. added this to the v0.117.0 milestone on Sep 16, 2026
  2. added
    type: bug
    on Sep 16, 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

    type: bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions