Terraform uses its own configuration language. AWS CDK and Pulumi take a different approach: you describe infrastructure in a general-purpose language like TypeScript or Python, with loops, functions, types, packages and unit tests. That makes it possible to build reusable infrastructure libraries for a whole team, but it also makes it easy to write clever code nobody can review. This course teaches both tools and the discipline to use them well.
What you'll learn
- How CDK synthesises CloudFormation, and how Pulumi drives cloud APIs through its engine and state
- CDK constructs at levels 1, 2 and 3, and building your own L3 patterns
- Pulumi resources, component resources and stack configuration
- Stacks, environments and passing values between them safely
- Managing secrets and configuration per environment
- Unit tests and snapshot tests for infrastructure code
- Previewing changes with
cdk diffandpulumi preview, and reading them carefully - Policy as code with cdk-nag and Pulumi CrossGuard
- Importing existing resources, refactoring without replacement and handling drift
- CI/CD for infrastructure: CDK Pipelines, GitHub Actions and Pulumi Deployments, with least-privilege deploy roles
Who it's for
- Developers who would rather write infrastructure in TypeScript or Python than HCL
- Platform engineers building shared infrastructure libraries for several teams
- Teams currently using click-ops or CloudFormation templates who want something maintainable
Prerequisites
- Solid TypeScript or Python
- Working knowledge of core AWS services (see Hands-On AWS: EC2, RDS and S3)
- An AWS account; Pulumi's free individual tier or a self-managed backend for state
Outcomes
By the end of this course you will be able to:
- Build and deploy multi-environment AWS infrastructure with both CDK and Pulumi.
- Package infrastructure into reusable, tested constructs and components.
- Enforce security and cost rules automatically before anything is deployed.
- Run infrastructure changes through CI with reviewable previews and safe rollouts.
Projects you'll build
- Serverless API stack – API Gateway, Lambda and DynamoDB defined in CDK with dev and production stages, practising constructs, stacks and
cdk diff. - Reusable web service component – a Pulumi component that creates a container service, load balancer, database and alarms from a few inputs, practising abstraction and unit tests.
- Guarded pipeline – infrastructure deployed from GitHub Actions with cdk-nag and CrossGuard policies blocking public buckets and untagged resources, practising policy as code and CI.
Tools you'll use
AWS CDK v2, Pulumi with TypeScript and Python, cdk-nag, Pulumi CrossGuard, Jest or pytest, GitHub Actions and the AWS CLI.
Course outline
| Module | Topic |
|---|---|
| 1 | Infrastructure as code in a general-purpose language |
| 2 | AWS CDK fundamentals and synthesis |
| 3 | CDK constructs and patterns |
| 4 | Pulumi fundamentals and state |
| 5 | Pulumi components and configuration |
| 6 | Environments, secrets and cross-stack values |
| 7 | Testing infrastructure code |
| 8 | Policy as code |
| 9 | Importing, refactoring and drift |
| 10 | CI/CD for infrastructure |
| 11 | Choosing between CDK, Pulumi and Terraform |
| 12 | Project: a tested, policy-checked platform stack |
FAQ
How is this different from the Terraform course?
Terraform Infrastructure as Code teaches Terraform and HCL. This course covers tools that use programming languages instead, and module 11 compares all three so you can choose for your team.
CDK or Pulumi?
CDK is AWS-focused and builds on CloudFormation. Pulumi supports many clouds and SaaS providers and manages state itself. We teach both because many teams use one and evaluate the other.
Do I need to know CloudFormation?
No, but we show the CloudFormation that CDK produces, because reading it helps when a deployment fails.
How do I join?
Get in touch and we'll share the current format, schedule and enrolment details.