aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

fix(cdk): agent stack template at 98.4% of the CloudFormation 1 MB limit

Offen
#735 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
143
Forks
46
Ø Merge
3 T. 10 Std.
Gemergte PRs (30 T.)
24

Beschreibung

### Observed (live deploy, 2026-08-06, ADR-021 P2 smoke run)

With the Lambda MicroVMs backend + image configured, the synthesized `backgroundagent-dev` template measured **983,796 bytes of the 1,000,000-byte CloudFormation limit (98.4%)** and **486 of 500 resources**. Roughly one more construct of headroom before deploys start failing for reasons unrelated to whatever change triggers it.

### Impact

Any feature adding a handful of resources (P3 suspend/resume wiring is next in line) can push the stack over either limit, failing deploys with confusing errors.

### Proposal

- Short term: measure per-construct contribution (`cdk synth | wc -c` bisection) and prune obvious weight (duplicated policy statements, verbose metadata)
- Structural: split the stack (nested stacks or a second stack for optional backends), which also helps the 500-resource ceiling
- Add a synth-time size/resource-count warning at e.g. 90% so the next increment is caught at build time, not deploy time

Found during ADR-021 P2 verification (#645); not MicroVM-specific.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem CDK-Synthese-Einstiegspunkt und führe `cdk synth` für das Template `backgroundagent-dev` aus, wobei seine Byte-Größe und Ressourcenanzahl mit den angegebenen Grenzwerten verglichen werden. Überprüfe die Beiträge der einzelnen Constructs sowie die vorgeschlagenen Ansätze zur Aufteilung des Stacks und für Warnungen; abgeschlossen ist die Aufgabe, wenn das Template ausreichend Sicherheitsreserve hat oder aufgeteilt ist und Schwellenwertwarnungen zukünftiges Wachstum vor dem Deployment erkennen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, typescript
Bereich
build-system, cloud, infrastructure
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.