
CDK Overview - What does it offer?
Explore the latest AWS CDK in TypeScript, covering constructs, stacks, environments, resources, tags, assets, access control, testing, and best practices for infrastructure as code.
Discover AWS CloudFormation concepts like templates and stacks, define resources with YAML or JSON, and use change sets and rollbacks to ensure safe, repeatable deployments.
Learn how the CDK uses constructs to provision AWS resources like S3 buckets and EC2 auto scaling groups within stacks, deployed through CloudFormation templates.
Learn how the AWS CLI lets you access EC2, S3, and more from your shell, run top and sub commands, and format outputs in JSON, YAML, YAML-stream, text, or table.
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.
Set up the aws cli locally by creating an iam user with minimal permissions, generating access keys, installing the cli, and configuring credentials, then run aws ec2 describe-instances to verify.
Set up the AWS CDK environment for TypeScript by installing Node.js, npm, and TypeScript, and verify CDK v2.99.0. Bootstrap with your AWS account and region us-east-2 to create CloudFormation resources.
Set up a TypeScript-friendly environment for AWS CDK by installing the TypeScript compiler, NodeJS, and npm, and using Visual Studio Code for development.
Develop your first CDK app by initializing a TypeScript project, provisioning an S3 bucket with CDK constructs, synthesizing to CloudFormation, deploying, updating versioning, and safely destroying the stack.
Learn how the three CDK construct types—L1, L2, and L3—map to cloud resources and stacks, and how scope, id, and props configure them for best practices.
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.
Demonstrate how to include multiple stacks in a CDK app to provision two microservices with Lambda functions, and deploy, update, and destroy them independently.
Group multiple stacks in a cdk application by creating a custom construct that deploys the microservice api stack and the microservice db stack.
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 using AWS profiles to define CDK environments, deploy stacks to specific regions, and switch between default and dev profiles with the CDK deploy command.
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.
Learn to reference one AWS resource from another in a CDK TypeScript app using constructs, proxy objects, and stack references, with grants and security groups and connections-based network access.
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.
Explore removal policies in AWS CDK for S3 buckets, apply destroy to delete resources on stack deletion, and enable auto delete objects for clean teardown.
Tag AWS resources in a CDK app by assigning key-value metadata; CDK applies tags recursively to stacks and all constructs.
Show how to tag resources in a CDK app, applying microservice tags to stacks and services, with tags cascading to lambdas, roles, and DynamoDB tables.
Tag resources with priority in a tags demo stack, including a Lambda todo service and a DynamoDB table. Resolve conflicts by higher priority and validate with CDK synthesis and deployment.
Discover how AWS CDK assets package local files, directories, and Docker images as S3 and ECR assets, enabling deployment-time references and attributes for Lambda functions.
Demonstrates using AWS CDK in TypeScript to work with S3 assets in a lambda from asset method, showing synth, deploy, and packaging local code into a zip in S3.
Explore AWS ECR, the elastic container registry, to store and access container images securely, push and pull with Docker CLI, enforce access policies, encryption, scanning, lifecycle rules, and cross-region replication.
Learn how AWS Fargate delivers a serverless, containerized platform, removing infrastructure management while offering isolation, security, and cost savings with CloudWatch Container Insights.
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.
Learn how CDK grant methods simplify cross-resource permissions, enabling DynamoDB access by a Lambda function via built-in grant read/write data methods instead of manual policy updates.
Learn to create and attach roles and policies in CDK with a Lambda role, add to policy, and resource policy methods to secure S3, DynamoDB, and other services.
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.