Many customers have provisioned resources through the https://aws.amazon.com/console/ or different Infrastructure as Code (IaC) tools, and then started using https://aws.amazon.com/cdk/ in a later stage. In this post, I will show you how to import existing AWS Resources into an AWS CDK Stack. The AWS CDK is a framework for defining cloud infrastructure through code and provisioning it with https://aws.amazon.com/cloudformation/ stacks.

To import existing AWS resources into a CDK stack, you need to create the CDK stack and add the resource you want to import, then generate a CloudFormation template representing this stack. Next, you need to import this resource into the CloudFormation stack using the https://console.aws.amazon.com/cloudformation/home, by uploading the newly generated CloudFormation template.

Related Articles