(pipelines): Malformed YAML during stage deployment
See original GitHub issueNot 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
- Add a few resources (a composite alarm, a few normal ones, some metrics) to a stack, that already has a lot of monitoring resources
- 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
- CDK CLI Version : 1.82.0
- Framework Version: 1.82.0
- Node.js Version: 14.13.0
- OS : Ubuntu 20.04
- Language (Version): TypeScript
Other
- Region:
eu-north-1
- Pipeline execution ID:
f1bed18e-5916-44ef-acf0-edb3215d8c74
- CloudFormation request ID:
6c5ea7db-4315-4f03-9b58-97af912c627a
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:45 (23 by maintainers)
Top Results From Across the Web
Customize your pipeline - Azure Pipelines - Microsoft Learn
Step -by-step tutorial to customize a pipeline. ... A pipeline is defined using a YAML file in your repo. Usually, this file is...
Read more >Configuring CI/CD Pipelines as Code with YAML in Azure ...
Click the Deploy stage to follow each task. Expand the AzureRmWebAppDeployment task to review the steps performed during the Azure deployment.
Read more >Pipeline YAML Reference - Semaphore 2.0 Documentation
This document details YAML grammar used for describing the pipelines of Semaphore 2.0 projects. The core properties of a Semaphore pipeline configuration file ......
Read more >Troubleshooting Amazon SageMaker Model Building Pipelines
Your pipeline definition might not be formatted correctly. This can result in your execution failing or your job being inaccurate. These errors can...
Read more >mapping values are not allowed in this context - Stack Overflow
1). A syntax error (in your case it is not) in the yaml file. Use a YAML linter to be sure that your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We were also experiencing the issue. In our case it was a combination of size and non-ascii characters. After increasing the size of the Stack the Prepare Step failed with “Template format error: JSON not well-formed”. After removing non-ascii characters (ü in our case) the stack could be deployed via the pipeline normally. 24KB with non-ascii characters -> Working 98KB with non-ascii characters -> Not Working (JSON not well-formed Error) 98KB without non-ascii characters -> Working
I am in contact next week with the CodePipeline team to discuss this. This is ridiculous in my opinion.