
CDK Overview - What does it offer?
Explore the AWS CDK CLI toolkit, learning how to initialize, deploy, and manage stacks using the CDK deploy command and tags, with npm, AWS CLI credentials, and profiles.
Define an aws lambda with l1 cdk constructs, specifying runtime, source code in s3, and an iam execution role; deploys and tests a sample l1 function using nodejs 18.
Deploy a lambda with the L2 construct in AWS CDK using typescript, showing a simpler alternative to the L1 approach, and validate via cdk synth and deploy.
Demonstrates using the L3 Lambda Rest API construct to create an API gateway that routes HTTP requests to a Lambda function, with proxy enabled and a prod stage for monitoring.
Understand how the app construct serves as the root of the CDK application, linking stacks and child constructs and guiding synthesize and deployment to AWS.
Understand CDK stacks as deployment units that group resources for provisioning, updating, and deleting, with 1-to-1 synthesized CloudFormation templates, and manage stacks using cdk ls, synth, deploy, and nested stacks.
Demonstrates using nested stacks in AWS CDK with a parent environment stack that groups API and database stacks, enabling unified deployment, updates, and destruction.
Understand how CDK environments map to AWS accounts and regions, and how stacks deploy across multiple environments using explicit, environment agnostic, or profile-based configurations.
demonstrates passing environment parameters directly in CDK code to deploy stacks with explicit account and region, using v3 env props and deployment steps.
Define aws environments using local environment variables instead of hard coding, bootstrap cdk in each region, and deploy stacks or nested stacks with process.env values for dev and prod.
Explore how CDK resource identifiers ensure uniqueness: construct IDs, paths, logical IDs, and physical IDs. See how CDK derives IDs from path or address and why avoiding changes prevents disruptions.
Showcases referencing a DynamoDB table from a Lambda function inside the same CDK stack, using environment variables, granting permissions, and validating the deployment.
Demonstrates cross-stack resource references in aws cdk by linking a dynamodb table in one stack to a lambda in another, with environment variables and a read/write grant.
Learn how removal policies in a CDK app control resource deletion during CDK destroy or stack deletion, including retain, destroy, and snapshot options, with auto delete for S3 objects.
Demonstrate how docker image assets work with CDK applications, building images from a docker file, pushing to AWS ECR, and referencing them in ECS task definitions.
AWS Cloud Development toolkit, which is most often termed as CDK lets you build IaC (infrastructure as a code) applications with the expressive power of a programming language. This is changing the way, IaC code was developed, tested or deployed.
CDK framework is available in 6 programming languages including Javascript, Typescript, Python, Java, Go and .Net. As the name suggests, AWS CDK is offered by AWS - Amazon Web Services.
This course provides you a practical training on AWS CDK, leveraging its core constructs and features. The course contains following sections.
1. Introduction - Quick overview of CDK and this course.
2.CDK Basics - Core components, supporting technologies like AWS CloudFormation and CDK CLI.
3.Develop first CDK application - Bare minimum needed to develop any CDK application - Pre-requisites, APIs, code structure and the CLI commands.
4. Constructs - Different types of CDK constructs-L1,L2, L3
5. Stacks - Apps, Stacks, Grouping, Nested Stacks.
6. Environments - Implicit Environments, Explicit Environments
7. Resources - Resource management, Removal policies, Referencing resources.
8. Tags - CDK Tags, Priority, Include/Exclude
9. Assets - AWS S3 Assets and Docker Image Assets.
10. Permissions - Grant methods, Roles & Policies,
11. Context - Context Cache, Feature Flags, Configuration
12. Additional Concepts - Code Whisperer, CDK Migrate, Escape Hatches
13. Testing - Testing CDK Applications, Template, Match,
14. Best practices - Best practices for Application, Code and Constructs.
15. Conclude - References and Next Steps
Each of the sections are supported with sample demonstrations. Please note that all the CDK examples are written in Typescript.