Skip to content

Conversation

@Ganji00
Copy link
Contributor

@Ganji00 Ganji00 commented Oct 22, 2025

Motivation

Fixes #12309

Add snapshot testing for CloudFormation stack creation with EC2 templates that include CloudFormation Init functionality.
Correctly raise an ClientError when invalid yaml file is provided.

Changes

  • Added snapshot test for CloudFormation EC2 template deployment test_create_stack_from_template
  • Added error handling in yaml parser for cloudeformation engine.

@Ganji00 Ganji00 marked this pull request as draft October 22, 2025 22:30
@Ganji00
Copy link
Contributor Author

Ganji00 commented Oct 22, 2025

Converted to draft as I misunderstood the issue, will work on it later on.

@simonrw
Copy link
Contributor

simonrw commented Oct 23, 2025

This is awesome, thank you for at least starting this change! I look forward to seeing where it goes. Do you want my initial comments now or should I wait until you are happy with the PR?

@Ganji00
Copy link
Contributor Author

Ganji00 commented Oct 23, 2025

This is awesome, thank you for at least starting this change! I look forward to seeing where it goes. Do you want my initial comments now or should I wait until you are happy with the PR?

let's wait, I will remove draft status when ready.

@Ganji00 Ganji00 marked this pull request as ready for review October 23, 2025 19:22
@Ganji00
Copy link
Contributor Author

Ganji00 commented Oct 23, 2025

Ok I think it's ready for review now @simonrw.

@Ganji00 Ganji00 changed the title Tests: Add CFn test for EC2 init Fix: Return proper client error for invalid YAML template structure Oct 23, 2025
@alexrashed alexrashed added semver: patch Non-breaking changes which can be included in patch releases docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes labels Oct 24, 2025
Copy link
Contributor

@simonrw simonrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you for your contribution. There are still some rough edges around the new engine and validation, so thank you for catching this one!

@simonrw simonrw merged commit 5583b79 into localstack:main Oct 28, 2025
47 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: skip Pull request does not require documentation changes notes: skip Pull request does not have to be mentioned in the release notes semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Cloudformation doesn't validate the format of the TemplateBody during a stack creation

3 participants