aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.68k stars 3.93k forks source link

(pipelines): Malformed YAML during stage deployment #12372

Closed straygar closed 1 year ago

straygar commented 3 years ago

Not 100% sure if this is a CDK, CodePipeline or CloudFormation bug.

It appears that CloudFormation bug (https://github.com/aws/aws-cdk/issues/11910) that has blocked our deployments for a few weeks was fixed! 🎉

However, trying to deploy the same stack to our first application stage now results in the following:

Template format error: YAML not well-formed. (line 5034, column 88) (Service: AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request ID: 6c5ea7db-4315-4f03-9b58-97af912c627a)

Which is odd - if I synthesize that stack locally, the YAML produced is only ~3000 lines long. Not really sure what I can do on my side to pinpoint the syntax error, if there is one.

Reproduction Steps

  1. Add a few resources (a composite alarm, a few normal ones, some metrics) to a stack, that already has a lot of monitoring resources
  2. Push the change, triggering the CDK pipeline

What did you expect to happen?

The stack to be deployed successfully in all application stages.

What actually happened?

The prepare step for the stack in the first stage fails with the error:

Template format error: YAML not well-formed. (line 5034, column 88) (Service: AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request ID: 6c5ea7db-4315-4f03-9b58-97af912c627a)

Environment

Other


This is :bug: Bug Report

hoegertn commented 1 year ago

I hit this error again as my template contains German umlauts (on purpose). So, in this case, there is no way around it, as these characters need to be in the template.

I pinged the CodePipeline team again. Is there anything else we can do to escalate this? UTF-8 is no new thing

kimmoahokas commented 1 year ago

Not related to CDK, but I stumbled into this issue while debugging same error message. Our CF template is about 81KB. It had character ä in one comment. Removing that solved the issue.

rix0rrr commented 1 year ago

Hi everyone in this thread.

Good news, CodePipeline team have been able to diagnose and fix this issue!

There are now no more problems deploying CloudFormation templates that contain unicode characters from CodePipeline. Closing this issue. Thank you all for sticking it out.

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.