How to migrate an existing CloudFormation Stack (created using Serverless Framework) to CDK without downtime?

0

We initially built our backend using IaC, using the Serverless Framework. Now we want to migrate to CDK.

The CloudFormation stack created by the Serverless Framework contains a bunch of DynamoDB tables, S3 buckets, Lambdas, etc.

How can we migrate an existing stack to CDK? I'm not asking how to write the actual CDK config (lets assume that I can write a CDK config that would generate the same CF XML as we got from the Serverless Framework) but how to make sure that the stack doesn't have to be taken down in the switch (which would imply downtime and data loss, unless we're very careful to avoid e.g. the DynamoDB tables being deleted).

  • Is it just a question of making sure that the stack gets the same name/ID and all the resources getting the same IDs?
  • Can I somehow preview what the result of the CDK deploy would be w.r.t. the existing stack (e.g. which resources would be created/removed)?
  • please accept the answer if it was useful

1 Answer

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions