Skip to main content

The AWS Cloud Development Kit library

Project description

AWS Cloud Development Kit Library

experimental

The AWS CDK construct library provides APIs to define your CDK application and add CDK constructs to the application.

Usage

Upgrade from CDK 1.x

When upgrading from CDK 1.x, remove all dependencies to individual CDK packages from your dependencies file and follow the rest of the sections.

Installation

To use this package, you need to declare this package and the constructs package as dependencies.

According to the kind of project you are developing:

  • For projects that are CDK libraries, declare them both under the devDependencies and peerDependencies sections.
  • For CDK apps, declare them under the dependencies section only.

Use in your code

Classic import

You can use a classic import to get access to each service namespaces:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk_lib import core, aws_s3 as s3

app = core.App()
stack = core.Stack(app, "TestStack")

s3.Bucket(stack, "TestBucket")

Barrel import

Alternatively, you can use "barrel" imports:

# Example automatically generated. See https://github.com/aws/jsii/issues/826
from aws_cdk_lib import App, Stack
from aws_cdk_lib.aws_s3 import Bucket

app = App()
stack = Stack(app, "TestStack")

Bucket(stack, "TestBucket")

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-cdk-lib-2.0.0a4.tar.gz (50.5 MB view hashes)

Uploaded Source

Built Distribution

aws_cdk_lib-2.0.0a4-py3-none-any.whl (50.7 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page