Skip to content

feat(cli): improve deployment failure reporting using CloudFormation FailedEvents filter #950

@garysassano

Description

@garysassano

Describe the feature

CloudFormation recently released a new feature for the DescribeEvents API that allows filtering events by root cause (FailedEvents=true) and grouping them by OperationId.

Currently, when a CDK deployment fails, the CLI outputs a large number of events, making it difficult to visually scan for the actual error that caused the rollback.

The new API capability is described here:
Accelerate infrastructure development with CloudFormation pre-deployment validation and simplified troubleshooting

Use Case

When deploying stacks with cdk deploy, you may encounter deployment failures. Finding the root cause currently requires scrolling through a long history of UPDATE_IN_PROGRESS and UPDATE_COMPLETE events to find the one CREATE_FAILED or UPDATE_FAILED event that triggered the rollback.

If the CLI utilized the new FailedEvents=true filter, it could immediately present the specific error(s) at the bottom of the log output, significantly reducing the time required to debug deployment issues.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.223.0

Environment details (OS name and version, etc.)

Ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions