Constructs for generating AWS infrastructure
Constructs are cloud components that encode configuration detail, boilerplate, and glue logic for using one or multiple AWS services. AWS CDK provides a library of constructs that cover many AWS services and features, enabling 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.
Customize, share, and reuse constructs
With AWS CDK, you can customize, share, and reuse constructs within your organization or community, just like any other software library. This enables you to build constructs that help you or others get started faster and incorporate best practices by default.
Powered by AWS CloudFormation
AWS CDK enables you to define your infrastructure with code and provision it through AWS CloudFormation. You get all the benefits of CloudFormation, including repeatable deployment, easy rollback, and drift detection.
Use familiar programming languages, tools, and workflows
AWS CDK enables you to model application infrastructure using TypeScript, Python, Java, .NET, and Go (in Developer Preview). With CDK developers can use existing IDE, testing tools, and workflow patterns. By leveraging tools like autocomplete and in-line documentation, AWS CDK enables you to spend less time switching between service documentation and your code.
Deploy infrastructure and runtime code together
AWS CDK enables 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.
Developer-friendly command line interface (CLI)
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 include:
Initialize a new, default application in the language of your choice.
Compile your AWS CDK application into an AWS CloudFormation template.
See a “diff” between your local AWS CDK code and the running application in AWS.
Deploy your AWS CDK application into testing or production via AWS 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 enables 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.