Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Perform programmatic actions using the CDK Toolkit Library

Focus mode
Perform programmatic actions using the CDK Toolkit Library - AWS Cloud Development Kit (AWS CDK) v2

This is the AWS CDK v2 Developer Guide. The older CDK v1 entered maintenance on June 1, 2022 and ended support on June 1, 2023.

This is the AWS CDK v2 Developer Guide. The older CDK v1 entered maintenance on June 1, 2022 and ended support on June 1, 2023.

Note

CDK Toolkit Library is in developer preview and is subject to change.

What is the CDK Toolkit Library Library?

The AWS Cloud Development Kit (AWS CDK) Toolkit Library enables you to perform AWS CDK actions requiring programmatic access on AWS. You can use the CDK Toolkit Library to implement actions such as bootstrapping, synthesizing, and deploying through code rather than CDK CLI commands. With this library, you can create custom tools, build specialized CLI applications, and integrate CDK programmatic access capabilities into your development workflows.

The following is an example, that installs the CDK Toolkit Library and uses it to deploy a cloud assembly of your CDK app:

import { Toolkit } from '@aws-cdk/toolkit-lib'; // Install the CDK Toolkit Library const cdk = new Toolkit(); // Create a CDK Toolkit instance // ... // Implement a deployment await cdk.deploy(cloudAssembly, { deploymentMethod: { method: "direct" }, // Configure deployment options ... }

Get started with the CDK Toolkit Library

To get started, see the ReadMe in the @aws-cdk/toolkit-lib npm package.

For API reference information, see the CDK Toolkit Library API reference.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.