Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AWS CDK - Infrastructure as Code
Search
Alexander Zeitler
February 19, 2020
Programming
0
42
AWS CDK - Infrastructure as Code
Slides for my AWS CDK talk at DevOps Meetup Karlsruhe, Germany
Alexander Zeitler
February 19, 2020
Tweet
Share
More Decks by Alexander Zeitler
See All by Alexander Zeitler
A Homage To Good Old MVC - JetBrains .NET Days 2024
alexzeitler
0
81
Docker-Compose - Container-Automatisierung mit Node.js
alexzeitler
0
62
CDK Components
alexzeitler
0
56
Leinen los: .NET Core Deployment mit Kubernetes in Azure #netdc18
alexzeitler
0
55
Kubernetes in Azure at Azure Meetup Frankfurt
alexzeitler
1
87
Azure ACS and Kubernetes at Imagine Conference 2017
alexzeitler
1
140
Azure ACS and Kubernetes
alexzeitler
1
90
Other Decks in Programming
See All in Programming
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
360
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
150
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
330
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
320
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
160
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
1.4k
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
510
エラーって何種類あるの?
kajitack
5
310
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
100
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
310
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
100
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
850
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
223
9.7k
RailsConf 2023
tenderlove
30
1.1k
Fireside Chat
paigeccino
37
3.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Faster Mobile Websites
deanohume
307
31k
Navigating Team Friction
lara
187
15k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
How to train your dragon (web standard)
notwaldorf
93
6.1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Transcript
AWS CDK Infrastructure as Code
Alexander Zeitler CTO + Cloud Solution Architect Vote2Work | @lxztlr
AWS CDK 2
Cloud Deployments • Reliable • Repeatable (Reproducible) • Testable •
Secure 3 AWS CDK
Level 0: Manual Infrastructure Setup 4 AWS CDK
Level 0: Manual Infrastructure Setup 5 AWS CDK Error prone
Not reproducable Time consuming Easy to get started Learn new Services
Level 1: Imperative Infrastructure as Code 6 AWS CDK deploy.*
AWS SDK AWS CLI
Level 1: Imperative Infrastructure as Code 7 AWS CDK Error
Handling (Retry) Infrastructure Updates Readiness Checks Rollback Concurrency
Level 1: Imperative Infrastructure as Code 8 AWS CDK Boilerplate
Coding Time consuming More mature than Manual • Faster • Reproducable (from Scratch)
Level 2: Declarative Infrastructure as Code 9 AWS CDK infrastructure.*
AWS CloudFormation AWS SDK
Level 2: Declarative Infrastructure as Code 10 AWS CDK infrastructure.*
Level 2: Declarative Infrastructure as Code 11 AWS CDK AWS
CloudFormation Template HashiCorp Configuration Language Desired State Configuration AWS CloudFormation
Level 2: Declarative Infrastructure as Code 12 AWS CDK Syntax
Lack of Abstractions Chatty Automation Reproducable Handles create vs. update
CloudFormation DOM 13 AWS CDK AWS CloudFormation CloudFormation Template Example:
GoFormation
CloudFormation DOM 14 AWS CDK Lack of Abstractions Real Code
Desired State
Maturity Levels of IaC 15 AWS CDK Manual Imperative Declarative
DOMs 2 1 0 “2+”
Level 3: AWS Cloud Development Kit (CDK) 16 AWS CDK
stack.ts AWS CFN AWS SDK AWS CDK
AWS CDK Constructs • Low-Level constructs based on AWS CloudFormation
• IAM Policy, IAM User, IAM Group, IAM Permission… • S3 Bucket • Route53 HostedZone • AWS Lambda • CloudWatch 17 AWS CDK
AWS CDK Stacks 18 AWS CDK Stack(s) Construct Construct AWS
CloudFormation CloudFormation Template
19 AWS CDK AWS CDK – Supported Platforms
AWS CDK - Abstraction 20 AWS CDK
AWS CDK 21 AWS CDK Write Code in familiar language
Create dependent resources with a single line of code Still declarative (CFN), handles create vs. update
AWS CDK - Commands 22 AWS CDK • cdk init
• cdk bootstrap • cdk synth • cdk deploy • cdk destroy
Hands on 23 AWS CDK
Team/Company Topologies • Infrastructure • Dev • Ops • Billing
24 AWS CDK
CDK Components / Patterns • Opinionated Compositions of CDK Constructs
• Permissions to deploy a PWA on S3 with route53 CNAME • Add/Remove CNAME in HostedZone • route53:ChangeResourceRecordSets • route53:ListHostedZonesByName • route53:GetHostedZone • route53:GetChange • Create S3 Bucket / Deploy to S3 Bucket 25 AWS CDK
26 AWS CDK IAM Base (Administrators etc.) AWS root Account
CDK Application / Service CDK Construct Security CI/CD CDK Pattern CDK Construct AWS CDK – Patterns
CDK Components / Patterns • Separation of Concerns • Reusable
across teams / services / applications • “Best practices as Code” (Patterns) • Least privilege • Tested 27 AWS CDK
Thanks! 28 AWS CDK
Resources Links • CDK Workshop: https://cdkworkshop.com/ • PDMLab CDK Constructs:
https://www.npmjs.com/package/@pdmlab/cdk-constructs • CDK Patterns: https://cdkpatterns.com/ • Building Cross-platform CDK Constructs: https://www.matthewbonig.com/2020/01/11/creating-constructs/ • CDK constructs on npm: #cdk • CDK Catalog on Twitter: @awscdkio 29 AWS CDK