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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Alexander Zeitler
February 19, 2020
Programming
50
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS CDK - Infrastructure as Code
Slides for my AWS CDK talk at DevOps Meetup Karlsruhe, Germany
Alexander Zeitler
February 19, 2020
More Decks by Alexander Zeitler
See All by Alexander Zeitler
A Homage To Good Old MVC - JetBrains .NET Days 2024
alexzeitler
0
100
Docker-Compose - Container-Automatisierung mit Node.js
alexzeitler
0
73
CDK Components
alexzeitler
0
64
Leinen los: .NET Core Deployment mit Kubernetes in Azure #netdc18
alexzeitler
0
61
Kubernetes in Azure at Azure Meetup Frankfurt
alexzeitler
1
100
Azure ACS and Kubernetes at Imagine Conference 2017
alexzeitler
1
150
Azure ACS and Kubernetes
alexzeitler
1
110
Other Decks in Programming
See All in Programming
AIの中の人になってみる
htkym
0
140
VibeCodingからAgenticWorkflowへ
starfish719
0
960
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.4k
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
250
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
270
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
570
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
110
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
130
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
690
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.2k
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
550
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.6k
It's Worth the Effort
3n
188
29k
AI: The stuff that nobody shows you
jnunemaker
PRO
9
950
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
400
Producing Creativity
orderedlist
PRO
348
40k
Designing Powerful Visuals for Engaging Learning
tmiket
1
520
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
490
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
370
A Modern Web Designer's Workflow
chriscoyier
698
190k
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