[cli] cdk synth should allow for an option to compact the template file (remove whitespaces) #8712
Labels
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
package/tools
Related to AWS CDK Tools or CLI
When producing JSON output cdk synth should have an option to minimize the output template file size.
Use Case
AWS Cloudformation has a limit on the template body size for an template on S3 at 460,800 bytes.
I had attempted to inject this type of filtering after cdk synth in the
cdk deploy
flow, but quickly got lost.This will allow deployment of larger stacks.
Proposed solution
Add an option on CDK Synth that will strip out all white spaces from the output template JSON (in my use case this reduced the size from 500k to 250k).
Possibly this could be an option for cdk.json
Other
Using Nested Stacks is the most common way to reduce stack size, in my use case I was doing a lot of with Cross Account CodePipelines which created many permissions objects and was very sensitive to repacking in nested stacks.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: