sincecutoff.com
← all changes

toolkit-lib DeployResult reports resource delete failures

Introduced 2026-06-03 · score 0.90

HOW TO USE IT

When using toolkit-lib to deploy a stack, inspect `deleteFailures` on the successful stack result; it lists resources CloudFormation failed to delete during a stack update. [Source](https://github.com/aws/aws-cdk-cli/blob/aws-cdk%40v2.1126.0/packages/%40aws-cdk/toolkit-lib/lib/api/deployments/deployment-result.ts)

const result = await toolkit.deploy(...); // pass the deployment arguments required by your application for (const stack of result.stackResults) { if (stack.type === 'did-deploy-stack') { for (const failure of stack.deleteFailures) { // inspect failure } } }

WHY THIS HELPS

When programmatically deploying a stack that may leave resources undeleted, inspect the deployment result for CloudFormation delete failures.

BEFORE THIS CHANGE

Programmatic consumers of `toolkit-lib` and integration tests could not observe this condition; CloudFormation could silently skip a failed deletion after retries while marking the update successful.

REQUIREMENTS AND LIMITATIONS

  • Version: 2.1126.0
  • deleteFailures (required): `ResourceDeleteFailure[]`; resources CloudFormation failed to delete during a stack update. Non-empty only when CloudFormation skipped deletion failures.
  • DeployedStack (required): Not found as a documented type in the opened result file; it defines `SuccessfulDeployStackResult` with `deleteFailures`.
  • This reports resource deletions CloudFormation failed to perform during a stack update.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card