Blog Blog Posts Business Management Process Analysis

What is AWS CDK (Amazon Cloud Development Kit)?

It provides a high-level object-oriented framework for declaratively defining AWS resources with the capability of modern programming languages. Using the CDK’s infrastructure constructs library, you can quickly incorporate AWS best practices in your infrastructure definition and publish it without worrying about boilerplate logic.

Table of contents:

Watch this video on AWS full course by Intellipaat:

AWS CDK Overview

The AWS CDK enables you to create reliable, scalable, and cost-effective cloud applications with the expressive capability of a programming language. This technique has numerous advantages, including

Python, Java, C#/.Net, TypeScript, JavaScript, and Go are all supported by the AWS CDK. Developers can use one of the supported programming languages to create reusable cloud components known as Constructs. These are assembled into Stacks and Apps.

Go through these AWS Interview Questions And Answers to excel in your Interview.

AWS CDK Benefits

Easier cloud onboarding

AWS CDK speeds up your AWS onboarding by reducing the number of topics you must learn. CDK lets you utilize your existing skills and tools to construct cloud infrastructure. It also includes high-level components that preconfigure cloud resources with tried-and-true defaults, allowing you to build on AWS without having to be an expert.

Faster development process

AWS CDK provides the expressive capability of programming languages for defining infrastructure. Objects, loops, and conditions, which you are already familiar with, will speed up your development process. You can also use AWS CDK in conjunction with your integrated development environment (IDE) to take advantage of current productivity tools and testing frameworks.

Customizable and shareable

You can use AWS CDK to create your own reusable components that meet your organization’s security, compliance, and governance needs. You can simply distribute components within your business, just like any other software library, allowing you to bootstrap new projects with best practices by default quickly.

No context switching

AWS CDK allows you to construct your cloud application without leaving your IDE. Using the same programming language, write your runtime code and define your AWS resources. You may use the AWS Toolkit for VS Code to see your CDK application stacks and resources.

Career Transition

How does AWS CDK work?

AWS already has a tool called cloudformation template that allows you to define your AWS resources using YAML code. However, there are several challenges to consider when learning and working with this template.

While using AWS CDK, you may define your stack using your existing understanding of programming languages such as javascript/python/java, etc.

When you define your resources and run the build command, CDK will generate a YAML cloudformation template for your stack. This removes the additional difficulty of learning and implementing the cloudformation template.

How does AWS CDK work

There are two methods for deploying infrastructure with AWS CDK. You may either use the AWS CDK Toolkit (the CLI command CDK) to deploy the infrastructure directly, or you can synthesize the project into CloudFormation templates and deploy the infrastructure the traditional way. The CDK command has the advantage of allowing you to differentiate against a deployed stack line by line in order to see the impact of a code change before pushing it.

If you have any doubts or queries related to this technology, do post on AWS Community.

AWS CDK v1 vs v2

In CDK version 1, you must install separate packages for each AWS resource (lambda/s3/API gateway, for example). However, with this strategy, you just use the libraries that are required. However, different versions of the libraries are incompatible with one another, and when a new resource is added, it must be of the same version as your previously installed libraries, or you must upgrade them to the latest version.

In CDK version 2, however, they abandoned the package-based approach in favor of a single core library that includes all constructs. All of the necessary constructions can be imported from aws-cdk-lib.

AWS CDK Concept

AWS CDK Concept

There are three core concepts of AWS CDK:


This is the base of your construct tree and combines all stacks and constructs into a single application that can then be deployed on AWS Cloud.


Stacks are basic deployable components in AWS CDK. A project can contain one or more stacks. By consuming resources from another stack, a stack can share values. AWS CDK leverages the CloudFormation import value to pass around different CloudFormation stacks behind the scenes.


AWS CDK stacks, like CloudFormation stacks, comprise constructs that describe one or more AWS resources. Constructs include everything CloudFormation requires to build a reusable cloud component.

 Low-level constructions (called L1) with a Cfn prefix correspond to CloudFormation resources and properties. You can use them similarly to CloudFormation (instead of JSON or YAML) by creating them in your programming language.

 L2 refers to higher-level constructs. You can create an Amazon Virtual Private Cloud (Amazon VPC) network address translation (NAT) gateway in each Availability Zone (AZ) or multiple types of networks, for example, with a single line of code.

Interested in learning more? Go through this AWS Tutorial!

AWS CDK tools

The AWS CDK Toolkit, often known as the Command Line Interface (CLI), is the primary interface via which you interact with your AWS CDK app. It runs your code and creates and deploys the AWS CloudFormation templates it generates. It can also deploy, diff, delete, and troubleshoot files.

The AWS Toolkit for Visual Studio Code is an open-source Visual Studio Code plug-in that simplifies the creation, debugging, and deployment of AWS applications. The toolkit provides an integrated experience for constructing AWS CDK applications, including the AWS CDK Explorer feature, which allows you to display your AWS CDK projects and navigate through the various CDK application components.


AWS CDK is a code-first way to define cloud application infrastructure. Following the “release early, release frequently” philosophy, more than 30 versions of AWS CDK have been launched to bring new functionality as rapidly as possible. As the AWS CDK gains popularity, new features will be developed swiftly and deployed frequently.

Check out Intellipaat’s AWS Training Course to get ahead in your career!

The post What is AWS CDK (Amazon Cloud Development Kit)? appeared first on Intellipaat Blog.

Blog: Intellipaat - Blog

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples