aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
fix(compute): deliver the Haiku geo profile to ECS agents
- Vorherrschende Sprache
- TypeScript
- Sterne
- 143
- Forks
- 46
- Ø Merge
- 3 T. 10 Std.
- Gemergte PRs (30 T.)
- 24
Beschreibung
## Problem
The ECS backend never sets `ANTHROPIC_DEFAULT_HAIKU_MODEL` in `cdk/src/constructs/ecs-agent-cluster.ts`. As a result, `agent/src/config.py` falls back to the hardcoded `us.anthropic.claude-haiku-4-5-20251001-v1:0` profile.
On deployments configured with a non-US `bedrockGeoRegion`, the ECS task role grants the resolved geography but the auxiliary model still calls the US profile. This can fail with `AccessDenied` and contradicts the `resolveBedrockGeoRegion` JSDoc in `cdk/src/constructs/bedrock-models.ts`, which says the main and auxiliary models cannot route through different geographies. The later `haikuInferenceProfileId` JSDoc records this ECS exception.
## Expected behavior
Pass the resolved `haikuInferenceProfileId` to the ECS container as `ANTHROPIC_DEFAULT_HAIKU_MODEL`, matching AgentCore and Lambda MicroVM delivery. Add a synth assertion for a non-US geography.
Refs #764
Beitragsleitfaden
Rechercherichtung
Beginne in cdk/src/constructs/ecs-agent-cluster.ts und verfolge, wie die aufgelöste haikuInferenceProfileId an ECS-Container übergeben wird; vergleiche die Übertragungspfade von AgentCore und Lambda MicroVM. Prüfe die zugehörige JSDoc in cdk/src/constructs/bedrock-models.ts und füge anschließend eine Synth-Assertion für eine nicht-US bedrockGeoRegion hinzu. Als abgeschlossen gilt die Aufgabe, wenn ECS ANTHROPIC_DEFAULT_HAIKU_MODEL auf das aufgelöste Profil setzt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, typescript
- Bereich
- cloud, infrastructure
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 82/100