Borislav Hadzhiev
Thu Apr 14 2022·1 min read
Photo by Ibrahim Rifath
Updated - Thu Apr 14 2022
The cdk synth
command outputs the CloudFormation equivalent of our CDK stack
and stores the template as json
in the cdk.out
directory.
However, the command's output to the terminal is in yaml
format.
In order to output JSON from the cdk synth
command we have to add the
--json
flag.
npx aws-cdk synth --json
Issuing the command on a CDK stack that consists of a single S3 bucket shows the following output: