Commit 338615f
fix: two bugs that prevent ECS Fargate from working (#494)
* fix two bugs that prevent ECS Fargate from working
The bootstrap policy at cdk/src/bootstrap/policies/infrastructure.ts is
missing iam:UpdateAssumeRolePolicy. When ECS is enabled,
AgentSessionRole.admitComputeRole(ecsTaskRole) rewrites the SessionRole
trust — fails at deploy time with 'User: cdk-...-cfn-exec-role is not
authorized to perform: iam:UpdateAssumeRolePolicy'.
cdk/src/handlers/shared/strategies/ecs-strategy.ts:93 has the boot
command do sys.path.insert(0, '/app') and from entrypoint import
run_task, but agent/Dockerfile copies the agent code to /app/src/.
Container exits 1 immediately with 'ModuleNotFoundError: No module
named entrypoint'. Easy to miss — the orchestrator just surfaces
'Essential container exited'; you have to dig into the ECS task's
CloudWatch stream to see the actual error.
Verified: uncommented EcsAgentCluster locally, set a repo to
compute_type=ecs, submitted a smoke task on a Rust repo. cargo check
ran clean inside the ECS container (exit 0, ~78s wall, $0.09).
* docs: add iam:UpdateAssumeRolePolicy to DEPLOYMENT_ROLES golden
Per @krokoko on PR #494 — the golden-baseline test compares the
TypeScript policy source against the JSON blocks in DEPLOYMENT_ROLES.md.
This adds the new action there and regenerates the Starlight mirror.
---------
Co-authored-by: bgagent <bgagent@noreply.github.com>1 parent 979ab69 commit 338615f
6 files changed
Lines changed: 6 additions & 1 deletion
File tree
- cdk
- bootstrap
- policies
- src
- bootstrap/policies
- docs
- design
- src/content/docs/architecture
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
| 824 | + | |
824 | 825 | | |
825 | 826 | | |
826 | 827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
0 commit comments