Skip to content

Conversation

@kzcat
Copy link

@kzcat kzcat commented Dec 18, 2025

Description of changes:

This PR enhances the error messages displayed when a CloudFormation changeset creation fails due to Early Validation:

https://aws.amazon.com/about-aws/whats-new/2025/11/cloudformation-dev-test-cycle-validation-troubleshooting/

Before

$ rain deploy sample.yaml
error creating changeset: The following hook(s)/validation failed: [AWS::EarlyValidation::ResourceExistenceCheck]. To troubleshoot Early Validation errors, use the DescribeEvents API for detailed failure information.

After

$ ./rain deploy sample.yaml
error creating changeset: changeset creation failed with validation errors:
  - Resource: TestBucket2 (AWS::S3::Bucket), Validation: BUCKET_EMPTINESS_VALIDATION, Reason: The bucket 'test-early-validation-20251218181322-2' is not empty. You must either delete all objects and versions or use the deletion policy to retain it, otherwise the delete operation will fail.
  - Resource: TestBucket1 (AWS::S3::Bucket), Validation: NAME_CONFLICT_VALIDATION, Reason: Resource of type 'AWS::S3::Bucket' with identifier 'test-early-validation-20251218181322-1' already exists.

@r-heimann
Copy link

This would be really awesome to have as a feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants