Skip to content

Make the ECS Fargate compute backend usable (context-gated wiring + ECS-parity fixes) #617

Description

@isadeks

Problem

main ships the ECS ComputeStrategy scaffolding (#8, #494) but the wiring in agent.ts is commented out and several ECS-parity gaps make the Fargate backend unusable in practice: the 8 KB containerOverrides limit truncates large payloads (#502, fixed), the boot command silently drops channel_source/build_command/etc (ABCA-487), and the ECS task role lacks parity grants the AgentCore runtime has (AgentCore Memory CreateEvent, per-workspace OAuth GetSecretValue, ec2:DescribeAvailabilityZones for the synth build gate).

Scope

Make the compute_type=ecs context-gated backend actually usable, at parity with AgentCore, without changing the default (agentcore) synth:

  • Context-gated wiring in agent.ts (ECS resources synthesize only under --context compute_type=ecs; default synth byte-for-byte unchanged).
  • run_task_from_payload binds the whole payload to run_tasks real signature via inspect.signature (fixes ABCA-487 silent-drop).
  • ECS-parity IAM grants on the task role, least-privilege and individually tested: AgentCore Memory CreateEvent (scoped to the memory ARN), bgagent-*-oauth-* GetSecretValue (prefix), read-only GetObject on the ECS compute strategy: RunTask rejected — payload inlined into 8 KB containerOverrides limit #502 payload bucket, ec2:DescribeAvailabilityZones.
  • CLI onboard guard reads the ComputeSubstrate stack output to fail at config-time.

Natural sibling of #502/#494. Delivered as the #503#596#597#598 PR stack.

Acceptance

  • Default (agentcore) synth unchanged; ECS resources appear only under the context flag.
  • A repo onboarded as compute_type: ecs runs end-to-end on Fargate with Linear/Jira reactions + PR-link comment (live-verified on dev).
  • All new task-role grants least-privilege (no whole-bucket write to the untrusted-code role).

Metadata

Metadata

Assignees

Labels

approvedWhen an issue has been approved and readyenhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions