Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
AWS CDK with Python – Step by Step
Highest Rated
Rating: 4.8 out of 5(236 ratings)
2,261 students

AWS CDK with Python – Step by Step

Learn AWS CDK v2 with Python for Infrastructure as Code (IaC) through clear, step-by-step lessons and hands-on practice.
Last updated 6/2026
English

What you'll learn

  • Define and deploy Infrastructure as Code (IaC) using AWS CDK v2 with Python.
  • Understand the CDK app lifecycle — from initialization to synthesis, deployment, and cleanup.
  • Use L1, L2, and L3 constructs effectively, and know how to select the right abstraction level.
  • Configure networking and assets with CDK, including VPCs, connections, and S3 buckets.
  • Work with cross-stack references and nested stacks for multi-stack architectures.
  • Apply CDK Aspects for tagging, validation, and automated compliance checks.
  • Write unit tests in Python using Pytest and CDK Assertions.
  • Learn to use AWS CDK Construct Library as a reference to find the constructs for your solution.
  • Deploy and connect real AWS resources such as Lambda, DynamoDB, API Gateway, and EC2.

Course content

6 sections39 lectures6h 2m total length
  • Course Introduction3:16

    You will meet the instructor and learn what will be covered in the course, the course prerequisites, and the topics of the first section.

  • Introduction to AWS CDK6:29

    You will understand why you should apply infrastructure as code and how AWS CDK differs from other tools like AWS CloudFormation. You will also learn the AWS CDK concepts.

  • Initializing Your CDK Environment15:23

    You will learn to configure and install the AWS CDK Toolkit and bootstrap a new CDK environment in your AWS account and region.

    We will cover the 'cdk bootstrap' command.

  • Creating Your First CDK App15:23

    You will learn to create your first Python AWS CDK application using the sample application provided by the AWS CDK team. You will understand the structure of an AWS CDK application.

    We will cover the 'cdk init' command.

  • CDK App Lifecycle & Synthesizing11:12

    You will understand the AWS CDK app lifecycle and learn to synthesize AWS CloudFormation templates from your AWS CDK apps using the AWS CDK Toolkit.

    We will cover the 'cdk synth' command.

  • Deploying Your CDK Stack10:08

    You will learn to deploy your AWS CDK stacks using the AWS CDK Toolkit to the CDK environment initialized at the beginning of the section.

    We will cover the 'cdk deploy' command.

  • Destroying Your CDK Stack6:29

    You will learn to delete the AWS CDK stacks deployed via your AWS CDK app using the AWS CDK Toolkit.

    We will cover the 'cdk destroy' command.

Requirements

  • Basic Python programming knowledge (variables, functions, loops).
  • Familiarity with core AWS services such as IAM, S3, and Lambda.
  • Being comfortable to use a terminal app to run CDK commands.
  • Curiosity to learn how AWS infrastructure can be built and managed programmatically.

Description

A clear, hands-on path to understanding AWS CDK v2 with Python — from fundamentals to multi-stack architectures and testing.


Infrastructure as Code (IaC) is now essential for modern cloud development, and the AWS Cloud Development Kit (CDK) allows you to define AWS infrastructure using familiar programming languages. In this course, you’ll learn to build real AWS architectures using Python and AWS CDK v2 — the latest version of the Cloud Development Kit, built natively on v2 from the start.


You’ll start by setting up your CDK environment and understanding how CDK translates your Python code into CloudFormation templates. Then, you’ll move beyond the basics to explore constructs, networking, assets, and multi-stack applications, applying each concept with hands-on AWS examples including Lambda, DynamoDB, API Gateway, EC2, and S3.


You'll also learn how to test and validate your infrastructure code using Pytest and CDK Assertions, and apply Aspects to automate tagging, validation, and compliance checks — ensuring your deployments are consistent and secure.


Each lesson is designed to be clear, structured, and practical, showing not only how to use CDK but why each configuration behaves the way it does. By combining theory with guided demonstrations, you’ll gain the skills and confidence to build and manage AWS infrastructure programmatically using Python — step by step.

Who this course is for:

  • Developers, DevOps Engineers, and Cloud Architects who want to use AWS CDK with Python.
  • Engineers transitioning from CloudFormation or Terraform to CDK.
  • Learners who prefer structured, concept-based lessons with hands-on AWS examples.
  • Anyone who wants to learn Infrastructure as Code (IaC) on AWS using Python in depth.