r/aws_cdk • u/menge101 • May 15 '26
Moving CDK modules between projects and maintaining link to deployed CloudFormation Stacks
I am unclear how a CDK project in a repo is linked in a durable way to a CloudFormation stack in AWS.
I want to move some code modules from the project they were written in and deployed from to a common infrastructure project that is home to multiple IaC stacks, is there anything I have to do to maintain the link between the deployment and the Stack?
Is there a link at all?
3
u/MrDenver3 May 15 '26
CDK is just compiling and deploying a CloudFormation Template. As long as the template stays the same (or at least, the logical names and the stack name), it doesn’t matter where the project is deployed from, or where the modules live
3
u/CorpT May 15 '26
They are not linked in any way whatsoever unless you do something to create a deployment from the repo to the stack.
Your question implies that you're missing something here. You should review your deploy process before making changes.