AWS Cloud Development Kit features

Page Topics

General

General

Constructs are cloud components that encode configuration detail, boilerplate, and glue logic for using one or multiple AWS services. AWS Cloud Development Kit (AWS CDK) provides a library of constructs that covers many AWS services and features, allowing you to define your applications' infrastructure at a high level. Additionally, constructs are adjustable and composable. You can easily change any of the parameters or encode your own custom construct.

AWS CDK also provides CFN Resources, which map 1:1 with base-level AWS CloudFormation resources, and provide a way to define CloudFormation with a programming language. CFN Resources provide complete coverage of CloudFormation resources and are available shortly after a CloudFormation resource is updated or newly available.

Constructs and CFN Resources are available in the AWS Construct Library. Visit the AWS Construct Library API reference to learn more.

With AWS CDK, you can customize, share, and reuse constructs within your organization or community, just like any other software library. This allows you to build constructs that help you or others get started faster and incorporate best practices by default.

AWS CDK allows you to define your infrastructure with code and provision it through CloudFormation. You get all the benefits of CloudFormation, including repeatable deployment, easy rollback, and drift detection.

AWS CDK helps you model application infrastructure using TypeScript, Python, Java, .NET, and Go (in developer Preview). With CDK, developers can use their existing integrated development environment (IDE), testing tools, and workflow patterns. Using tools like autocomplete and inline documentation, AWS CDK allows you to spend less time switching between service documentation and your code.

AWS CDK allows you to reference your runtime code assets in the same project with the same programming language. For example, you can include your AWS Lambda runtime code or Docker container image in your CDK project, and when you deploy your application, the CDK framework automatically uploads and configures the AWS service with your runtime assets. When the CDK deployment is complete, you will have a fully functional application.

The AWS CDK CLI enables you to interact with your CDK applications and enables functionality such as synthesizing a CFN template, showing the differences between the running stack and proposed changes, confirming security related changes prior to deployment, and deploying multiple stacks across multiple environments.

Commands

cdk init

Initialize a new default application in the language of your choice.

cdk synth

Compile your AWS CDK application into a CloudFormation template.

cdk diff

See a diff between your local AWS CDK code and the running application in AWS.

cdk deploy

Deploy your AWS CDK application into testing or production with CloudFormation.

Integrate with your IDE

The AWS CDK Explorer (Preview) is a feature in the AWS Toolkit for Visual Studio Code, which provides you a bird’s eye view of your applications, infrastructure stacks, resources, and policies. The AWS CDK Explorer lists your CDK projects and allows you to easily browse the various components of your CDK application. The AWS CDK Explorer sidebar is integrated within Visual Studio Code, and you can find it on the default Visual Studio Code Explorer icon. After you run cdk synth, you can refresh the AWS CDK Explorer view to update the display tree and reflect the changes you’ve made in your infrastructure.

Lines of code imagery