Forrest logo
tool overview
On this page you find all important commands for the CLI tool cdk. If the command you are looking for is missing please ask our AI.

cdk

The CDK (Cloud Development Kit) is a command-line tool developed by Amazon Web Services (AWS) that simplifies the creation and provisioning of cloud infrastructure resources. It allows you to define your infrastructure using familiar programming languages such as TypeScript, JavaScript, Python, or Java, rather than using complex YAML or JSON templates.

With CDK, you can define reusable cloud components called "constructs" that represent AWS resources like EC2 instances, S3 buckets, or even entire application architectures. These constructs can be composed together to form complete cloud applications or infrastructure stacks.

Some key features of CDK include:

  1. Familiar programming languages: Instead of learning domain-specific languages, you can define and provision your AWS infrastructure using the languages you are already comfortable with, leveraging features like code completion, refactoring, and code reuse.

  2. Infrastructure as code: CDK enables you to treat your infrastructure as code, allowing you to version, test, and apply standard software engineering practices to your infrastructure development. This brings benefits like infrastructure code review, ease of collaboration, and repeatability.

  3. Automatic provisioning: When you make changes to your infrastructure code, CDK automatically generates the corresponding AWS CloudFormation templates and provisions the required resources using these templates. It handles the creation, update, and deletion of resources for you, reducing the manual effort.

  4. AWS CloudFormation integration: CDK leverages AWS CloudFormation under the hood, which provides a reliable and scalable way to manage AWS resources. It generates CloudFormation templates transparently and integrates well with existing CloudFormation stacks and templates.

By using CDK, infrastructure developers and DevOps engineers can increase the productivity, maintainability, and scalability of their infrastructure code, while also benefiting from the extensive AWS service ecosystem.

List of commands for cdk:

  • cdk:tldr:0dea7 cdk: Deploy a space-separated list of stacks.
    $ cdk deploy ${stack_name}
    try on your machine
    explain this command
  • cdk:tldr:3e02a cdk: Compare the specified stack with the deployed stack or a local CloudFormation template.
    $ cdk diff ${stack_name}
    try on your machine
    explain this command
  • cdk:tldr:8720c cdk: Create a new CDK project in the current directory for a specified language.
    $ cdk init -l ${language_name}
    try on your machine
    explain this command
  • cdk:tldr:a7f5d cdk: Open the CDK API reference in your browser.
    $ cdk docs
    try on your machine
    explain this command
  • cdk:tldr:bee34 cdk: Synthesize and print the CloudFormation template for the specified stack(s).
    $ cdk synth ${stack_name}
    try on your machine
    explain this command
  • cdk:tldr:c8d4b cdk: List the stacks in the app.
    $ cdk ls
    try on your machine
    explain this command
  • cdk:tldr:f2bfc cdk: Destroy a space-separated list of stacks.
    $ cdk destroy ${stack_name}
    try on your machine
    explain this command
tool overview