While trying to integrate CDK with Serverless framework I am facing an issue with certain resources.
CDK creates cloudformation parameters with no default value.
I added the Parameters key in serverless.ts just like for the Resources key (app.synth().getStackByName(stack.stackName).template.Parameters) but I get an error "Parameters must have values" while deploying.
Indeed, CDK v2 synthetizer now implements a few checks that translates in CloudFormation instructions. This article was written with v1 in mind.
One of the check CDK performs in v2 is the version of the bootstrap stack it relies on in normal CDK usage, through CloudFormation parameters - those missing in your case. One way to overcome this is to disable such check by overriding CDK v2 synthetizer as described below :
Hello Frédéric ! Great article !
While trying to integrate CDK with Serverless framework I am facing an issue with certain resources.
CDK creates cloudformation parameters with no default value.
I added the Parameters key in serverless.ts just like for the Resources key (app.synth().getStackByName(stack.stackName).template.Parameters) but I get an error "Parameters must have values" while deploying.
Did you face similar issue ?
Thanks Louis :) !
Indeed, CDK v2 synthetizer now implements a few checks that translates in CloudFormation instructions. This article was written with v1 in mind.
One of the check CDK performs in v2 is the version of the bootstrap stack it relies on in normal CDK usage, through CloudFormation parameters - those missing in your case. One way to overcome this is to disable such check by overriding CDK v2 synthetizer as described below :
I'll update the article to reflect this change now that v2 is more popular than v1. Thanks for pointing that out !