aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
fix(cdk): agent stack template at 98.4% of the CloudFormation 1 MB limit
- Lingua principale
- TypeScript
- Stelle
- 143
- Fork
- 46
- Merge medio
- 3g 9h
- PR unite (30g)
- 20
Descrizione
### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal punto di ingresso della sintesi di CDK ed esegui `cdk synth` per il template `backgroundagent-dev`, misurandone la dimensione in byte e il numero di risorse rispetto ai limiti indicati. Esamina i contributi dei singoli construct e gli approcci proposti per suddividere lo stack e aggiungere avvisi; il lavoro è completato quando il template dispone di un margine di sicurezza sufficiente oppure è suddiviso, e gli avvisi di soglia rilevano la crescita futura prima del deployment.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, typescript
- Ambito
- build-system, cloud, infrastructure
- Tipo di issue
- Bug
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100