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

bug(cdk): AgentCore runtime leaks ENIs that block cdk destroy; Memory undeletable while CREATING

Aperta
#702 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
143
Fork
46
Merge medio
3g 9h
PR unite (30g)
20

Descrizione

### Observed (live, us-east-1, 2026-07-31, ADR-021 P1 verification run)

1. **`cdk destroy` of the agent stack hung >1h40m and ended `DELETE_FAILED`**: two service-managed `agentic_ai` ENIs (AgentCore runtime) remained attached to the platform VPC's private subnets after the runtime resource was deleted, blocking deletion of both private subnets and the runtime SG. The stack had to be left in `DELETE_FAILED` (zero-cost residue: VPC shell, 2 subnets, 1 SG) pending eventual ENI release and a delete retry.
2. **`AWS::BedrockAgentCore::Memory` cannot be deleted while in `CREATING`** — a teardown racing a slow Memory creation wedges.

### Impact

Any operator tearing down a deployment (ephemeral stacks, #72's scheduled cleanup) hits multi-hour destroy times or `DELETE_FAILED` states through no fault of their own.

### Proposal

- Investigate whether AgentCore ENI release can be awaited or forced (custom resource that waits/detaches on stack deletion, similar to VPC-lambda ENI cleanup patterns)
- Guard Memory deletion on reaching a stable state
- At minimum: document the expected destroy latency + retry procedure in the developer guide

Not specific to the Lambda MicroVMs backend — observed on the AgentCore substrate during unrelated verification. Refs #645.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il comportamento di teardown di AgentCore in us-east-1 e leggi ADR-021, insieme al contesto correlato in #645. Confronta la pulizia ENI proposta e il blocco dell’eliminazione di Memory con la correzione minima documentata; è completato quando destroy termina senza DELETE_FAILED oppure la guida per gli sviluppatori documenta chiaramente la latenza prevista e i passaggi per ritentare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws
Ambito
cloud, infrastructure
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.