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
47
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
89
Docker-Compose - Container-Automatisierung mit Node.js
alexzeitler
0
65
CDK Components
alexzeitler
0
58
Leinen los: .NET Core Deployment mit Kubernetes in Azure #netdc18
alexzeitler
0
57
Kubernetes in Azure at Azure Meetup Frankfurt
alexzeitler
1
89
Azure ACS and Kubernetes at Imagine Conference 2017
alexzeitler
1
150
Azure ACS and Kubernetes
alexzeitler
1
93
Other Decks in Programming
See All in Programming
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
200
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
180
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
160
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
180
New in Go 1.26 Implementing go fix in product development
sunecosuri
0
310
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
280
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
450
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
350
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
610
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
230
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
270
AIプロダクト時代のQAエンジニアに求められること
imtnd
2
650
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
280
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.7k
Visualization
eitanlees
150
17k
Paper Plane (Part 1)
katiecoart
PRO
0
5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
270
Embracing the Ebb and Flow
colly
88
5k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
110
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Mind Mapping
helmedeiros
PRO
1
110
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