Skip to content
v2.275.0

Constructs ​

Version 10.8.1

Separate package

constructs is not part of aws-cdk-lib — install it separately:

sh
npm install constructs
pip install constructs

Software-defined persistent state

Releasenpm versionPyPI versionNuGet versionMaven Central

What are constructs? ​

Constructs are classes which define a "piece of system state". Constructs can be composed together to form higher-level building blocks which represent more complex state.

Constructs are often used to represent the desired state of cloud applications. For example, in the AWS CDK, which is used to define the desired state for AWS infrastructure using CloudFormation, the lowest-level construct represents a resource definition in a CloudFormation template. These resources are composed to represent higher-level logical units of a cloud application, etc.

Support policy ​

All maintained Node.js versions are supported by this package.

Contributing ​

This project has adopted the Amazon Open Source Code of Conduct.

We welcome community contributions and pull requests. See our contribution guide for more information on how to report issues, set up a development environment and submit code.

License ​

This project is distributed under the Apache License, Version 2.0.

Types ​

NameKindSummary
ConstructConstructRepresents the building block of the construct graph.
ConstructOrderEnumIn what order to return constructs.
DependableClassTrait for IDependable.
DependencyGroupClassA set of constructs to be used as a dependable.
IConstructInterfaceRepresents a construct.
IDependableInterfaceTrait marker for classes that can be depended upon.
IMixinMixinA mixin is a reusable piece of functionality that can be applied to constructs to add behavior, properties, or modify existing functionality without inheritance.
IValidationInterfaceImplement this interface in order for the construct to be able to validate itself.
MetadataEntryStructAn entry in the construct metadata table.
MetadataOptionsStructOptions for construct.addMetadata().
NodeClassRepresents the construct node in the scope tree.
RootConstructConstructCreates a new root construct node.