Core AWS CDK Concepts
To understand AWS CDK, it helps to know a few core building blocks. These concepts work together to define and deploy your cloud infrastructure.
- App - An App is the entry point of an AWS CDK project. It acts as a container for one or more stacks and defines the overall scope of your infrastructure. Think of it as the root of your CDK application.
- Stack - A Stack represents a deployable unit of infrastructure and maps directly to an AWS CloudFormation stack. Stacks are used to group related resources and are commonly separated by environment (dev, staging, production) or by functionality.
- Construct - A Construct is a reusable building block in AWS CDK. It represents a cloud component such as an S3 bucket, Lambda function, or an entire architecture pattern. Constructs help abstract complexity and promote clean, maintainable infrastructure code.
- Resources - Resources are the actual AWS services created during deployment — such as IAM roles, DynamoDB tables, Lambda functions, or IoT rules. In CDK, resources are defined inside constructs and ultimately provisioned by CloudFormation.