
Set up your environment and progress from basics to advanced CDK concepts. Build a serverless API, a CloudWatch metric alarm, and CI/CD deployments.
Identify and install the core tools for aws cdk: node.js, a text editor, and the aws cli, plus language specifics (typescript or python) and optional vs code toolkit.
Configure an AWS CLI user with administrator access to deploy CDK stacks, generate access keys, run aws configure to set credentials and region, and verify permissions with aws s3 ls.
Explore how CDK and CloudFormation work, deploy a CDK project with the CDK CLI in Python or TypeScript, and study S3 bucket constructs via AWS CDK docs and API reference.
Explore AWS CloudFormation as an infrastructure-as-code solution using json or yaml templates to deploy and manage stacks of resources, including S3 buckets with lifecycle rules, and understand CDK.
Explore how CDK translates Python or TypeScript code into a CloudFormation template via the jsii compiler, providing an abstraction over CloudFormation and enabling cdk init in Python and TypeScript.
Explore the Bayes project and learn how CDK generates a CloudFormation template from code, comparing TypeScript and Python workflows, including cdk.json, synthesis, and the generated cdk.out template.
Bootstrapping your CDK environment configures the CDK toolkit, creates an S3 bucket and IAM roles, then deploys your stack with CDK deploy and synth.
Explore how CDK code forms the project, including the app object, stacks and constructs, their scope and id, and cross-stack references across Python and TypeScript.
Create a simple s3 bucket with a three-day expiration lifecycle rule using cdk for Python. Synthesize and deploy the stack, and observe the lifecycle rule applying to objects.
Practice TypeScript constructs in AWS CDK by creating an S3 bucket with a three-day expiration lifecycle rule, then synthesize and deploy to validate the stack.
Explore the three levels of CDK constructs—L1 CFN resources, L2 abstractions with defaults and type safety, and L3 patterns—understanding when to use each for scalable cloud infrastructure.
Discover how CFN outputs reveal deployment-time values and shape the mental model of CDK code, learning to reference resources, access bucket names, and view outputs after deploy.
Explore essential AWS CDK commands, from init and bootstrap to synth and deploy. Learn to list stacks, compare changes with diff, use doctor, and destroy resources.
Master how to destroy stacks with CDK, understand the default retain removal policy for S3 buckets, and learn how removal policy destroy empties and deletes buckets via behind-the-scenes Lambda support.
Explore intermediate CDK topics, including CloudFormation IDs and their operation, intrinsic functions for infrastructure as code, and managing multiple stacks with cross-stack references to master professional CDK usage.
Explore CDK and CloudFormation IDs, distinguishing construct, logical, and physical IDs, how CDK generates logical IDs, and what changes or name conflicts mean for resources.
Explore CloudFormation intrinsic functions and how they enable runtime information in infrastructure as code, with examples of ref usage in the AWS CDK for Python and TypeScript.
Practice using intrinsic functions in Python CDK to derive a suffix from the stack ID with fn select and fn split, then apply it to a bucket name and synth.
Practice CloudFormation intrinsic functions by deriving a suffix from the stack id with fn split and fn select, then apply it to a CDK bucket name.
Explore multi-stack architecture in aws cdk, using import value and cross-stack references to share resources like buckets and lambdas across stacks, with cdk abstractions handling deployment order.
Learn to implement cross-stack references in AWS CDK using Python by exporting an S3 bucket from one stack and importing it into another, enabling environment variables for a basic Lambda.
Expose a public S3 bucket and reference it from another stack using cross stack references in CDK, then deploy a lambda that uses the bucket Arn.
Join the halfway point of the course to practice three hands-on projects, leverage GitHub resources and commits, and prepare for a dedicated testing section.
Build a practical serverless rest API with API Gateway, Lambda, and DynamoDB using CDK in TypeScript and Python, and test with a rest client.
Explore how to implement AWS lambda inside CDK, comparing hello world, sdk-enabled lambdas, and complex dependencies. Learn bundling, language choices, and docker-based builds.
Learn how to organize serverless architecture with API gateway, AWS Lambda, and DynamoDB, moving from single operation lambdas and monolithic lambdas toward multiple lambdas that serve API routes.
Build an API using AWS CDK with Python, creating a REST API, an employee resource, and a Lambda-integrated endpoint, tested via the deployment output URL.
Learn to build and deploy a basic API gateway and lambda with AWS CDK in TypeScript, using esbuild and Docker, exposing get and post endpoints for an employee resource.
Explore how the AWS SDK enables DynamoDB access from Lambda, including choosing between JavaScript v3 and Python boto3, and best practices for client initialization and IAM roles.
Create a DynamoDB table with CDK v2 and enable a Python Lambda to perform read and write queries using boto3 on that table, with on-demand billing.
Create a DynamoDB table with CDK v2, set a partition key and on-demand billing, and wire a lambda with table name as env var to handle get and post queries.
Demonstrate enabling CORS for an AWS CDK API gateway backed by Lambda by configuring headers and an OPTIONS method in TypeScript and Python. Deploy and test the browser fetch end-to-end.
Build a service monitor using CloudWatch metrics and alarms, and deploy a webhook Lambda to respond to alerts. Learn to configure metrics and alarms with the CDK and the AWS CLI, illustrating why CloudWatch is a go-to tool for logs, metrics, and alarms.
Configure a CloudWatch metric and alarm that forwards state changes to an SNS topic, triggering a Lambda to call a Slack webhook, demonstrated in Python and TypeScript CDK projects.
Develop a Python webhook lambda in a services folder that posts JSON-encoded SNS messages to a configured webhook URL using urllib3, with local testing before AWS deployment.
Implement a webhook lambda in a TypeScript project that posts SNS record messages to a webhook URL, and test locally with ts-node and AWS Lambda types.
Learn how CloudWatch metrics work across AWS services, create custom metrics with a namespace and values using AWS CLI, and prepare alarms with SNS and Lambda in the next lessons.
Configure CloudWatch alarms in the console by selecting a metric, setting a one-minute period, choosing a threshold, and understanding static versus anomaly detection for CDK implementation.
Define a CloudWatch alarm for a (custom) metric using AWS CDK in Python, trigger an SNS topic that invokes a lambda to call an HTTP hook, then deploy and test.
Implement a CDK-driven monitoring pipeline by wiring a metric alarm to an SNS topic and a webhook Lambda, then run CDK synth and deploy to verify CloudFormation.
Test the alarm by pushing metrics through the command line interface to trigger alerts above 100 for one minute, and receive Slack messages from Python and TypeScript stacks.
Create a real resource alarm for API gateway 400 errors using the TS employee API, configure dimensions, deploy stacks, and verify Slack alerts.
Automate ci/cd with cdk to deliver changes instantly by integrating git-driven workflows that automate checkout, dependencies, build, tests, and deployment for a sample app on s3 via cloudfront.
Host a static website on S3 with CloudFront, use an origin access identity for private buckets, and organize separate CDK infra and a React TypeScript web app for CI/CD.
Learn to deploy a static site with Python CDK by creating an S3 deployment bucket, configuring a CloudFront distribution with an origin identity, and publishing dist files to S3.
Create an infrastructure as code project with TypeScript, build the web app to a dist folder, host it on S3, and distribute via CloudFront using CDK constructs and bucket deployment.
Demonstrates how AWS CDK uses CloudFormation custom resources and a lambda to deploy assets to S3, revealing the generated code and event handling for create, update, and delete.
Set up a GitHub repository and GitHub actions to automate deployment of AWS CDK infrastructure, building a ci cd pipeline with commits and branches, and configuring IAM rights for access.
Create a non-admin IAM user and policy for GitHub actions to deploy CDK resources; generate access keys and add them and the region as repository secrets.
Configure GitHub actions to deploy AWS infrastructure with CDK from commits, using Python and TypeScript workflows. Build and deploy web app assets, synthesize CDK, and run CDK deploy with secrets.
This section introduces CDK testing techniques, covering assertions, matchers, captures, and snapshot tests, using Python and TypeScript with Jest or pytest to test constructs like Lambda, S3, and IAM roles.
Create a Python AWS CDK testing project with a simple lambda and bucket. Set up a virtual environment, install Pi test, and write tests for CDK constructs.
Learn to write isolated tests for each CDK stack in Python, use pytest fixtures to synthesize a CloudFormation template once, and validate lambda runtime and resource counts.
Explore Python test matchers in CDK, using matchers to validate lambda runtime and IAM policies in CloudFormation templates, including object like versus object equals and regular expression checks.
Learn to use captures from CDK assertions in Python to test IAM policy actions for a lambda to bucket, with array comparisons that ignore order.
Discover snapshot testing in AWS CDK with Python, capturing JSON snapshots of resources like buckets and comparing them to predefined snapshots, including setup, usage, and maintenance considerations.
Explore testing CDK TypeScript apps using Jest and the CDK assertions library, creating a sample stack with a lambda and a versioned bucket to validate grants.
Write basic TypeScript CDK tests and optimize a test suite with jest, reaching constructs via stack methods and has resource properties to validate Lambda runtime.
Master CDK testing methods, including resource count checks and matchers for complex code. Use matchers like object like to validate NodeJS runtimes and IAM policies in templates.
Explore the CDK lib assertions captures feature to capture resource arguments and validate IAM policy actions. Learn to compare expected and action arrays with Jest, and prepare for snapshot testing.
Learn snapshot testing in TypeScript with jest, saving and comparing bucket template snapshots, and updating with npm test -- -u when changes occur.
Explore CDK tags, CDK aspects, and an extended look at L3 constructs, using two starter projects in Python and TypeScript built around a simple lambda and bucket stack.
Learn to tag AWS resources with the CDK in Python, applying key-value tags to stacks and specific resources, customize with include resource types and priority, and verify tags via synth.
Learn how to use tags in CDK with TypeScript to organize and track costs across stacks and sub constructs, apply metadata to resources, and control tag priority and scope.
Explore CDK aspects to apply operations across constructs in a scope, enforcing tags and security patterns. Learn to use CDK nag and build a custom aspect to audit CloudFormation policies.
Learn how to implement a CDK aspect in Python to inspect CFN policies for forbidden actions, emit warnings via annotations, and prepare for a TypeScript version in the next lecture.
Build a TypeScript CDK aspect that inspects generated CloudFormation policies for forbidden actions, and emit warnings with add warning v2 inside a policy checker class.
Explore CDK patterns libraries and L3 constructs, using AWS solutions constructs and Construct Hub to build reusable, secure patterns like DynamoDB, S3, API Gateway, with less code and open-source references.
Leverage the course insights to advance your programming career and infrastructure as code projects. Explore other Udemy resources and courses, and leave a review.
This course is designed to teach how to use AWS CDK as a professional. You can start to migrate your cloud infrastructure to CDK right after course completion.
The course contains code examples for Python and TypeScript, but you can enroll even if you plan to use CDK with another language, singe most topics are presented at an abstract level and you can easily apply the course material for your preferred programming language, maybe Java, C# or Go.
Main course topics:
Tools required for CDK: AWS account, IAM user for console access, AWS CLI configuration
CDK introduction:
AWS CloudFormation intro and intermediate topics
CDK console commands like init, synth, deploy, destroy, doctor
Exploring the generated project with CDK init
Use Python to write infrastructure as code
Use Typescript to write infrastructure as code
Understand the different level of CDK constructs - L1, L2, L3
The mental model behind CDK - with CloudFormation intrinsic functions
CDK intermediate topics:
CloudFormation and CDK ids
Intrinsic functions practice with Python and Typescript
How to handle multiple CloudFormation stacks
Python and Typescript cross stack references
Practice session: Serverless API with ApiGateway, Lambda and DynamoDb:
Configure the serverless app infrastructure
Configure aws Lambda for Python and Typescript
Write DynamoDB queries with boto3 for Python
Write DynamoDB queries with aws-sdk for typescript
Solve the CORS issue for APIs accessed by browsers
Practice session: CloudWatch metrics and Alarms
Learn AWS cloud watch features like metrics, alarms and logs
Configure and webhook lambda with Python or TypeScript
Write Infrastructure as Code for the alarm metrics with CDK
Practice session: CICD and web deployment
Use CDK to configure web deployment with AWS Cloud Front and s3
Implement CICD with GitHub actions
Configure CICD for Python and Typescript
Configure an IAM user for GitHub (not Administrator)
CDK testing:
Write tests for infrastructure as code and run them with Pytest or Jest
Learn about fine grained assertions, matchers, captors and snapshot testing
Analyze the Cloud Formation outputs and generated templates in order to understand the tests
Use best practices when testing infrastructure as code
Other CDK topics: tags, aspects, patterns.
Why this course stands out from other Udemy courses:
Beyond the basics - after finish, you can directly use this knowledge into production code
Practical knowledge - presentations are kept to a minimum, we focus on what is really important
Logical and flexible structure - take the course at your own pace
Fast paced, concise, most typing cut out - focus on explanations - respect for your time
Code changes in each lecture on Git with code diffs
Big font, dark background, full HD content, this way it is readable even on a small screen or even tablet.
Lifetime access
Certificate of completion to present to your current or prospective employer
Q&A active instructor
Go beyond the theory and learn from an active instructor, aligned with today's programming demands!