SlideShare a Scribd company logo
AWS CDK:
Your Infrastructure is Code!
~ # whoami
(afronski)
✓ Co-founder and Cloud Architect
at Pattern Match
Erlang, Elixir, Java, Node.js
Python, DevOps, AWS
✓ Co-organizer of Natywna Chmura
✓ Program member at Cloudyna
Why me?
[repo]: find . -iname *.yaml -exec cat {} ; | wc -l
5221
[repo]: find . -iname *.sh -exec cat {} ; | wc -l
1231
[repo]: find . -iname *.py -exec cat {} ; | wc -l
200
Why me?
The current state of
Infrastructure as Code
1. As a developer, I am tired of using a DSL/YAML.
a. Lack of expressiveness.
b. Limited reusability and modularity.
c. Learning curve in the shared codebase.
2. Configuration Drift.
3. State Management and Stateful Resources.
4. Sensible Testing.
5. Sensible Local Development.
What’s missing?
Alternatives?
1. Ansible - YAML strikes back.
2. Sceptre - Jinja-based CloudFormation templates.
3. AWS SAM - Again, YAML on top of YAML.
4. Stack Deployment Tool - Perun-like case.
5. Terraform - Do I have to explain myself again?
6. Troposphere *
7. Pulumi *
8. AWS CDK
AWS CDK
Cloud Development Kit
Features
Features
1. Multiple platforms and programming languages support:
a. TypeScript, Python, JVM (Java), .NET (C#)
2. CloudFormation-native workflow (rollbacks).
a. If something is not supported, you are able
to use so called L1 constructs on your own.
3. Testability and built-in support for local development.
4. Flexibility (AWS CDK Constructs).
5. Easy migration from pure CloudFormation templates.
let participant = new User (this, ...);
let userBucket = new Bucket(this, ...);
userBucket.grantReadWrite(participant);
userBucket.addDependsOn(participant);
Demo (4 examples)
patternmatch/aws-cdk-playground
Problems?
1. Documentation.
2. Learning curve (AWS CDK Constructs).
3. No support for passing CloudFormation parameters.
a. AWS CDK introduces Context instead.
4. No support for StackPolicies so far.
5. Some things may need override in the resulting CloudFormation:
a. e.g. not supported services.
6. Generated logical IDs are not exactly user-friendly (debugging).
a. Such template is hard to analyze (assembly language).
What’s next?
1. Documentation!
2. Infrastructure as Code as a first-class source code citizen.
a. e.g. Jenkins Pipelines or Jenkins X.
b. Sidenote: Kubernetes and co do not invalidate the need for IaC.
3. Opening door for abstracting the cloud vendors.
4. Type-safe AWS Infrastructure?
a. punchcard/punchcard
5. Even better support for serverless applications.
References
1. Our company - Pattern Match and my talks.
2. Natywna Chmura (facebook, website).
3. Cloudyna (website) - 13.11.2019, Katowice.
4. Source Code: patternmatch/aws-cdk-playground.
5. Another simple example: patternmatch/amazon-sagemaker-in-practice.
6. AWS Cloud Development Kit - Official Page.
7. AWS CDK Workshop.
8. Python and TypeScript officially supported in AWS CDK.
9. CDK All The Things: A Whirlwind Tour.
10. Building serverless apps with AWS CDK and testing them locally.
11. The Last Thing I missed in the CloudFormation.
12. punchcard/punchcard - Type-safe AWS Infrastructure.
13. Why We Built Ludwig? - Fugue Blog.
14. AWS CloudFormation is an infrastructure graph management service.
15. The Definitive Guide to using Terraform with Serverless Framework.
16. Thoughtworks Technology Radar - HOLD: Handwritten CloudFormation.
17. Terraform vs CloudFormation.

More Related Content

What's hot

마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
Amazon Web Services Korea
 
Containers on AWS: An Introduction
Containers on AWS: An IntroductionContainers on AWS: An Introduction
Containers on AWS: An Introduction
Amazon Web Services
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
Amazon Web Services
 
AWS Kubernetes 서비스 자세히 살펴보기 (정영준 & 이창수, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
AWS Kubernetes 서비스 자세히 살펴보기 (정영준 & 이창수, AWS 솔루션즈 아키텍트) :: AWS DevDay2018AWS Kubernetes 서비스 자세히 살펴보기 (정영준 & 이창수, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
AWS Kubernetes 서비스 자세히 살펴보기 (정영준 & 이창수, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
Amazon Web Services Korea
 
Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...
Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...
Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...
Amazon Web Services Korea
 
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
Amazon Web Services Korea
 
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
Amazon Web Services Korea
 
セキュリティ設計の頻出論点
セキュリティ設計の頻出論点セキュリティ設計の頻出論点
セキュリティ設計の頻出論点
Tomohiro Nakashima
 
AWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar SeriesAWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar Series
Amazon Web Services
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Amazon Web Services
 
AWS CDK in Practice
AWS CDK in PracticeAWS CDK in Practice
AWS CDK in Practice
Chulwoo Choi
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
Amazon Web Services
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS
Amazon Web Services
 
Security hub workshop
Security hub workshopSecurity hub workshop
Security hub workshop
Ryuhei Shibata
 
AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...
AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...
AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...
Amazon Web Services Korea
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
Amazon Web Services
 
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as CodeAWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
Amazon Web Services
 
AWS Monitoring & Logging
AWS Monitoring & LoggingAWS Monitoring & Logging
AWS Monitoring & Logging
Jason Poley
 
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Amazon Web Services Korea
 
Aws VPC
Aws VPCAws VPC

What's hot (20)

마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
마이크로 서비스를 위한 AWS Cloud Map & App Mesh - Saeho Kim (AWS Solutions Architect)
 
Containers on AWS: An Introduction
Containers on AWS: An IntroductionContainers on AWS: An Introduction
Containers on AWS: An Introduction
 
K8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKSK8s on AWS: Introducing Amazon EKS
K8s on AWS: Introducing Amazon EKS
 
AWS Kubernetes 서비스 자세히 살펴보기 (정영준 & 이창수, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
AWS Kubernetes 서비스 자세히 살펴보기 (정영준 & 이창수, AWS 솔루션즈 아키텍트) :: AWS DevDay2018AWS Kubernetes 서비스 자세히 살펴보기 (정영준 & 이창수, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
AWS Kubernetes 서비스 자세히 살펴보기 (정영준 & 이창수, AWS 솔루션즈 아키텍트) :: AWS DevDay2018
 
Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...
Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...
Amazon EKS를 통한 빠르고 편리한 컨테이너 플랫폼 활용 – 이일구 AWS 솔루션즈 아키텍트:: AWS Cloud Week - Ind...
 
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
AWS Summit Seoul 2023 | Amazon EKS 데이터 전송 비용 절감 및 카오스 엔지니어링 적용 사례
 
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
 
セキュリティ設計の頻出論点
セキュリティ設計の頻出論点セキュリティ設計の頻出論点
セキュリティ設計の頻出論点
 
AWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar SeriesAWS Infrastructure as Code - September 2016 Webinar Series
AWS Infrastructure as Code - September 2016 Webinar Series
 
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
Running Microservices and Docker on AWS Elastic Beanstalk - August 2016 Month...
 
AWS CDK in Practice
AWS CDK in PracticeAWS CDK in Practice
AWS CDK in Practice
 
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
AWS Landing Zone Deep Dive (ENT350-R2) - AWS re:Invent 2018
 
(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS(DVO401) Deep Dive into Blue/Green Deployments on AWS
(DVO401) Deep Dive into Blue/Green Deployments on AWS
 
Security hub workshop
Security hub workshopSecurity hub workshop
Security hub workshop
 
AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...
AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...
AWS Summit Seoul 2023 | AWS의 개발자를 위한 신규 서비스 소개 Amazon CodeCatalyst & Amazon C...
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
 
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as CodeAWS January 2016 Webinar Series - Managing your Infrastructure as Code
AWS January 2016 Webinar Series - Managing your Infrastructure as Code
 
AWS Monitoring & Logging
AWS Monitoring & LoggingAWS Monitoring & Logging
AWS Monitoring & Logging
 
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
Kubernetes/ EKS - 김광영 (AWS 솔루션즈 아키텍트)
 
Aws VPC
Aws VPCAws VPC
Aws VPC
 

Similar to AWS CDK: Your Infrastructure is Code!

Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
QAware GmbH
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
QAware GmbH
 
Cdk 101
Cdk 101Cdk 101
Cloud computing workshop at IIT bombay
Cloud computing workshop at IIT bombayCloud computing workshop at IIT bombay
Cloud computing workshop at IIT bombayNilesh Satpute
 
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegExploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
VMware Tanzu
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
Sandeep Parikh
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your Startup
Amazon Web Services
 
Dystopia as a Service
Dystopia as a ServiceDystopia as a Service
Dystopia as a Service
Adrian Cockcroft
 
AWS EKS: Amazon Manages Kubernetes
AWS EKS: Amazon Manages KubernetesAWS EKS: Amazon Manages Kubernetes
AWS EKS: Amazon Manages Kubernetes
Philipp Koch
 
Functional Programming in Serverless World (Serveless UG Poland)
Functional Programming in Serverless World (Serveless UG Poland)Functional Programming in Serverless World (Serveless UG Poland)
Functional Programming in Serverless World (Serveless UG Poland)
Serverless User Group Poland
 
Apache Spark Streaming in K8s with ArgoCD & Spark Operator
Apache Spark Streaming in K8s with ArgoCD & Spark OperatorApache Spark Streaming in K8s with ArgoCD & Spark Operator
Apache Spark Streaming in K8s with ArgoCD & Spark Operator
Databricks
 
Matt Chung (Independent) - Serverless application with AWS Lambda
Matt Chung (Independent) - Serverless application with AWS Lambda Matt Chung (Independent) - Serverless application with AWS Lambda
Matt Chung (Independent) - Serverless application with AWS Lambda
Outlyer
 
Zenko & MetalK8s @ Dublin Docker Meetup, June 2018
Zenko & MetalK8s @ Dublin Docker Meetup, June 2018Zenko & MetalK8s @ Dublin Docker Meetup, June 2018
Zenko & MetalK8s @ Dublin Docker Meetup, June 2018
Laure Vergeron
 
2016 10-26 docker meetup - kubernetes on open stack
2016 10-26 docker meetup - kubernetes on open stack2016 10-26 docker meetup - kubernetes on open stack
2016 10-26 docker meetup - kubernetes on open stack
Amrita Prasad
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
Camuel Gilyadov
 
Clocker - How to Train your Docker Cloud
Clocker - How to Train your Docker CloudClocker - How to Train your Docker Cloud
Clocker - How to Train your Docker Cloud
Andrew Kennedy
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
Haggai Philip Zagury
 
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
HostedbyConfluent
 
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Felix Gessert
 
Functional Programming in Serverless World
Functional Programming in Serverless WorldFunctional Programming in Serverless World
Functional Programming in Serverless World
Wojciech Gawroński
 

Similar to AWS CDK: Your Infrastructure is Code! (20)

Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
 
Cluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards KubernetesCluster-as-code. The Many Ways towards Kubernetes
Cluster-as-code. The Many Ways towards Kubernetes
 
Cdk 101
Cdk 101Cdk 101
Cdk 101
 
Cloud computing workshop at IIT bombay
Cloud computing workshop at IIT bombayCloud computing workshop at IIT bombay
Cloud computing workshop at IIT bombay
 
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegExploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
 
Kubernetes and Hybrid Deployments
Kubernetes and Hybrid DeploymentsKubernetes and Hybrid Deployments
Kubernetes and Hybrid Deployments
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your Startup
 
Dystopia as a Service
Dystopia as a ServiceDystopia as a Service
Dystopia as a Service
 
AWS EKS: Amazon Manages Kubernetes
AWS EKS: Amazon Manages KubernetesAWS EKS: Amazon Manages Kubernetes
AWS EKS: Amazon Manages Kubernetes
 
Functional Programming in Serverless World (Serveless UG Poland)
Functional Programming in Serverless World (Serveless UG Poland)Functional Programming in Serverless World (Serveless UG Poland)
Functional Programming in Serverless World (Serveless UG Poland)
 
Apache Spark Streaming in K8s with ArgoCD & Spark Operator
Apache Spark Streaming in K8s with ArgoCD & Spark OperatorApache Spark Streaming in K8s with ArgoCD & Spark Operator
Apache Spark Streaming in K8s with ArgoCD & Spark Operator
 
Matt Chung (Independent) - Serverless application with AWS Lambda
Matt Chung (Independent) - Serverless application with AWS Lambda Matt Chung (Independent) - Serverless application with AWS Lambda
Matt Chung (Independent) - Serverless application with AWS Lambda
 
Zenko & MetalK8s @ Dublin Docker Meetup, June 2018
Zenko & MetalK8s @ Dublin Docker Meetup, June 2018Zenko & MetalK8s @ Dublin Docker Meetup, June 2018
Zenko & MetalK8s @ Dublin Docker Meetup, June 2018
 
2016 10-26 docker meetup - kubernetes on open stack
2016 10-26 docker meetup - kubernetes on open stack2016 10-26 docker meetup - kubernetes on open stack
2016 10-26 docker meetup - kubernetes on open stack
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
Clocker - How to Train your Docker Cloud
Clocker - How to Train your Docker CloudClocker - How to Train your Docker Cloud
Clocker - How to Train your Docker Cloud
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
 
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
Confluent On Azure: Why you should add Confluent to your Azure toolkit | Alic...
 
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
 
Functional Programming in Serverless World
Functional Programming in Serverless WorldFunctional Programming in Serverless World
Functional Programming in Serverless World
 

More from Wojciech Gawroński

Mashup! AWS Lambda, Elixir and IoT Button
Mashup! AWS Lambda, Elixir and IoT ButtonMashup! AWS Lambda, Elixir and IoT Button
Mashup! AWS Lambda, Elixir and IoT Button
Wojciech Gawroński
 
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
Wojciech Gawroński
 
Serverless .NET on AWS
Serverless .NET on AWS Serverless .NET on AWS
Serverless .NET on AWS
Wojciech Gawroński
 
Learn Elixir The Hard Way
Learn Elixir The Hard WayLearn Elixir The Hard Way
Learn Elixir The Hard Way
Wojciech Gawroński
 
Functional Programming in the Wild
Functional Programming in the WildFunctional Programming in the Wild
Functional Programming in the Wild
Wojciech Gawroński
 
Why docker@localhost is not even remotely near DevOps?
Why docker@localhost is not even remotely near DevOps?Why docker@localhost is not even remotely near DevOps?
Why docker@localhost is not even remotely near DevOps?
Wojciech Gawroński
 
How to move a mission critical system to 4 AWS regions in one year?
How to move a mission critical system to 4 AWS regions in one year?How to move a mission critical system to 4 AWS regions in one year?
How to move a mission critical system to 4 AWS regions in one year?
Wojciech Gawroński
 
Abusing Erlang compilation pipeline for Fun and Profit
Abusing Erlang compilation pipeline for Fun and ProfitAbusing Erlang compilation pipeline for Fun and Profit
Abusing Erlang compilation pipeline for Fun and Profit
Wojciech Gawroński
 

More from Wojciech Gawroński (8)

Mashup! AWS Lambda, Elixir and IoT Button
Mashup! AWS Lambda, Elixir and IoT ButtonMashup! AWS Lambda, Elixir and IoT Button
Mashup! AWS Lambda, Elixir and IoT Button
 
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
 
Serverless .NET on AWS
Serverless .NET on AWS Serverless .NET on AWS
Serverless .NET on AWS
 
Learn Elixir The Hard Way
Learn Elixir The Hard WayLearn Elixir The Hard Way
Learn Elixir The Hard Way
 
Functional Programming in the Wild
Functional Programming in the WildFunctional Programming in the Wild
Functional Programming in the Wild
 
Why docker@localhost is not even remotely near DevOps?
Why docker@localhost is not even remotely near DevOps?Why docker@localhost is not even remotely near DevOps?
Why docker@localhost is not even remotely near DevOps?
 
How to move a mission critical system to 4 AWS regions in one year?
How to move a mission critical system to 4 AWS regions in one year?How to move a mission critical system to 4 AWS regions in one year?
How to move a mission critical system to 4 AWS regions in one year?
 
Abusing Erlang compilation pipeline for Fun and Profit
Abusing Erlang compilation pipeline for Fun and ProfitAbusing Erlang compilation pipeline for Fun and Profit
Abusing Erlang compilation pipeline for Fun and Profit
 

Recently uploaded

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 

AWS CDK: Your Infrastructure is Code!

  • 2. ~ # whoami (afronski) ✓ Co-founder and Cloud Architect at Pattern Match Erlang, Elixir, Java, Node.js Python, DevOps, AWS ✓ Co-organizer of Natywna Chmura ✓ Program member at Cloudyna
  • 3. Why me? [repo]: find . -iname *.yaml -exec cat {} ; | wc -l 5221 [repo]: find . -iname *.sh -exec cat {} ; | wc -l 1231 [repo]: find . -iname *.py -exec cat {} ; | wc -l 200
  • 5. The current state of Infrastructure as Code
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. 1. As a developer, I am tired of using a DSL/YAML. a. Lack of expressiveness. b. Limited reusability and modularity. c. Learning curve in the shared codebase. 2. Configuration Drift. 3. State Management and Stateful Resources. 4. Sensible Testing. 5. Sensible Local Development. What’s missing?
  • 11. Alternatives? 1. Ansible - YAML strikes back. 2. Sceptre - Jinja-based CloudFormation templates. 3. AWS SAM - Again, YAML on top of YAML. 4. Stack Deployment Tool - Perun-like case. 5. Terraform - Do I have to explain myself again? 6. Troposphere * 7. Pulumi * 8. AWS CDK
  • 13.
  • 14.
  • 16. Features 1. Multiple platforms and programming languages support: a. TypeScript, Python, JVM (Java), .NET (C#) 2. CloudFormation-native workflow (rollbacks). a. If something is not supported, you are able to use so called L1 constructs on your own. 3. Testability and built-in support for local development. 4. Flexibility (AWS CDK Constructs). 5. Easy migration from pure CloudFormation templates.
  • 17.
  • 18. let participant = new User (this, ...); let userBucket = new Bucket(this, ...); userBucket.grantReadWrite(participant); userBucket.addDependsOn(participant);
  • 20. Problems? 1. Documentation. 2. Learning curve (AWS CDK Constructs). 3. No support for passing CloudFormation parameters. a. AWS CDK introduces Context instead. 4. No support for StackPolicies so far. 5. Some things may need override in the resulting CloudFormation: a. e.g. not supported services. 6. Generated logical IDs are not exactly user-friendly (debugging). a. Such template is hard to analyze (assembly language).
  • 21. What’s next? 1. Documentation! 2. Infrastructure as Code as a first-class source code citizen. a. e.g. Jenkins Pipelines or Jenkins X. b. Sidenote: Kubernetes and co do not invalidate the need for IaC. 3. Opening door for abstracting the cloud vendors. 4. Type-safe AWS Infrastructure? a. punchcard/punchcard 5. Even better support for serverless applications.
  • 22. References 1. Our company - Pattern Match and my talks. 2. Natywna Chmura (facebook, website). 3. Cloudyna (website) - 13.11.2019, Katowice. 4. Source Code: patternmatch/aws-cdk-playground. 5. Another simple example: patternmatch/amazon-sagemaker-in-practice. 6. AWS Cloud Development Kit - Official Page. 7. AWS CDK Workshop. 8. Python and TypeScript officially supported in AWS CDK. 9. CDK All The Things: A Whirlwind Tour. 10. Building serverless apps with AWS CDK and testing them locally. 11. The Last Thing I missed in the CloudFormation. 12. punchcard/punchcard - Type-safe AWS Infrastructure. 13. Why We Built Ludwig? - Fugue Blog. 14. AWS CloudFormation is an infrastructure graph management service. 15. The Definitive Guide to using Terraform with Serverless Framework. 16. Thoughtworks Technology Radar - HOLD: Handwritten CloudFormation. 17. Terraform vs CloudFormation.

Editor's Notes

  1. Hello! Thank you for being here! I am energized, because I would like to share some exciting news with you. I really think that it provides a fresh and novel ideas to the Infrastructure as Code space.
  2. My name is Wojtek, afronski on the internet. Cloud Architect and Co-founder of the Pattern Match. That lovely avatar is made by my friends from Pattern Match after I bragged about that I can write a bash loop from memory (and obviously failed). ;) In PM we’re doers - experienced and trusted advisors in best practices of software delivery, efficiency, performance and availability. We do that by employing successfully cloud computing, cloud native approach and destroying walls between business and technical teams.
  3. Why me? Am I qualified to whine about this topic? That is just a snapshot from one of the projects that I bootstrapped and maintained for more than a 2 years. YAML here is representing a pile of AWS CloudFormation. So I know a thing or two about Infrastructure as Code from design, implementation and maintenance points of view. Nowadays I am writing more Python than bash, but pile of text files is not smaller surprisingly.
  4. The amount of YAML and CloudFormation was so overwhelming that I thought it would be a great idea to write a separate tool that will perform an opinionated linting, validation, and other helpful operations on it. Name of this tool is Perun and its written in Go. I am the creator of this tool, most of us from Pattern Match contributed to this tool - it stayed in the good hands of our colleagues at Appliscale. At this point of time I think it was a Stockholm Syndrome. Reasoning and justification sounded perfectly fine to me. From the perspective of couple more projects I think we did a huge mistake there to not employ better tools at that time.
  5. Knowing a bit about me, allow me to show you the current landscape of the Infrastructure as Code. And I will start with a rant about the current state of IaC. WARNING: bear with me, when I will hyperventilate.
  6. Oh boy there are a lot of yaks to be shaved here. YAML anyone? I have a bad news to you - if you are throwing YAML files back and forth you are not an engineer, nor a programmer. Anyone recognizes this cute error up in the corner? Yup, that is Terraform that blown up and if you will have luck, you will be able to restore state from the remote backend without nitpicking JSON via scissors and glue.
  7. Those who work with CloudFormation on a daily basis and are old enough to remember the JSON representation of it will have a goosebumps right now. I know it sounds, but YAML is a better part of the CloudFormation. But here it comes the best part! This YAML is a subset of an original YAML specification. What is missing? E.g. no anchors (very useful), no variables, no way to reuse fragments.
  8. Why am I talking about this? Because more smarter people than me are seeing the shortcomings of those methods. Here you have a screenshot from the latest Technology Radar by Thoughtworks where they’ve marked Handwritten CloudFormation as a Hold (so you should avoid that). I am surprised tho, that they are naming Terraform as a sensible default - as it has its downfalls too and does not provide a sensible rollback, where CloudFormation does.
  9. Current state of IaC sucks, and it’s covered by a lot of DSLs or YAML files that eventually will blow up in our faces. Nowadays most of the decisions are made between Terraform (supposedly free of vendor lock-in) and Cloud Vendor specific tools. Which is represented by the new and official logo of AWS CloudFormation, but you can use any logo e.g. Google Deployment Manager. Our friends that pray to the Kubernetes god are smiling in the corner - they will powerful and superior. They are supposedly agnostic of “this crap” and … they use tool specific YAML format. Those people are sharing the smirk with the guys doing serverless apps with use Serverless Framework. Guess what? This YAML is problematic too, and maintaining a significant serverless system causes a lot of pain. At least it is much easier and more maintainable than using Terraform for that. God forbid! All those techniques are susceptible on main issues: Configuration Drift. State Management. Dealing with stateful resources. How to sensibly test this crap? All those problems are showing clearly: Is it a proper battle to fight in a first place?
  10. Let’s see what is missing and how it can be improved. For sure we can benefit from having a real programming language and its expressiveness. You may ask: what with my declarativeness? Well, as a functional programmer I can tell you that in most cases YAML is as declarative as the API allows for it. Declarative programming has roots in functional programming and is about telling what we want to do, without describing how we want to do it. We express the logic of a computation without describing its control flow, which is perfectly possible with regular programming languages. How to handle configuration drift? Assuming we are dealing with distributed environments, on-calls and so on. Managing state when provisioning is also problematic, as you have to deal with many shortcomings, and people that are using Terraform and nested CloudFormation stacks are having goosebumps now. Sensible testing mechanism to shorten the feedback loop and maintainability. Sensible local development - again for shortening the feedback loop and experimentation.
  11. Let’s investigate alternatives and how they map with the deficiencies that we have described previously: So you can go with Ansible for orchestration and its wrappers - we are using that, and it works sensibly, although it’s not a real code, and you are moving above the original abstraction. You can use Sceptre (provided by CloudReach), but still it is a Jinja2 templating smacked on top of YAML with added orchestration. AWS SAM has the same deficiencies and its serverless specific. Stack Deployment Tool is basically the same story I have described with Perun - it’s a Stockholm Syndrome. Terraform was covered previously - I do not treat it as a viable alternative here. No rollback, share most of the issues with CloudFormation, just has different syntax. Last three options are the closest to the real code and they can be considered a viable alternative. To be precise only AWS CDK, because Troposphere and Pulumi for now are not providing a sensible testability. Also Pulumi is serverless specific. With Troposphere it is possible, although it’s not available out of the box.
  12. Let’s talk about our “savior” now. AWS CDK was originally created around September 2018 and released as a beta around that time. I have used the beta version in Autumn 2018, where it was available just for TypeScript and at that time it already looked promising. I have gathered my thoughts and observation in the blog post attached to this slide. In June 2019 AWS announced that Cloud Development Kit is generally available for TypeScript and Python. Yet, it supports additionally Java and C# too.
  13. How it works? It basically allows you to model your infrastructure with use of code and programming languages using a library of constructs. With use of this library you are create, manage, implement, and maintain infrastructure as code definitions that at the end are translated directly to the AWS CloudFormation. It allows you to build on top of well-known patterns and behaviors of this service - including rollback, configuration drift, state management. Yet, you have capabilities of a first-class programming languages.
  14. I deliberately said translates. If you will treat CloudFormation templates as an intermediate language (e.g. assembly), it works exactly like the compiler. For us, programmers, it is a bread and butter - we work on a higher level of abstraction, reusing higher level constructs and modules that are compiling to the low-level elements delivered by the platform or runtime. In that case CloudFormation service is our runtime or execution engine.
  15. Let’s discuss briefly its the most interesting features before we will dive into the details during demo session.
  16. I’ve already said that they are supporting multiple programming languages - the best and official support is for TypeScript and Python. Java and C# are still in beta, but perfectly usable. It’s fully based on CloudFormation service and templates, so you have all benefits and traits of those built-in. That includes rollbacks, configuration drifts, full support on the AWS side, and many others. It means, that even if the library maintainers are a little bit behind, you are able to spit our regular CloudFormation with use of L1 constructs and fill out the gaps with pure CloudFormation syntax. It is fully testable locally, and even encourages local development - with checking configuration drift, diffs, generating synthesized template, etc. It gives you the flexibility of the programming language and ability to create modular, reusable abstractions with use of constructs. Which is a game changer for the most of the alternatives mentioned previously. It allows for an easy migration from the pure CloudFormation templates with use of many techniques: You can rewrite your templates into CDK using overrides for simpler templates. You can include your existing more complicated templates into CDK and rewrite them bit by bit. You can use built-in disassembler that creates a raw AWS CDK code in a given language from AWS CloudFormation. Even if it does not fully use the power of CDK (it’s of course a limited tool), it really helps with kickstarting the effort and starting the project.
  17. Here you have just one example of the diff between the current managed state and the CDK definition stored locally. It shows you the exact difference, and you can use the same mechanism doing local tests (e.g. with unit testing).
  18. Speaking about abstractions and helpers: AWS CDK provides a lot of existing abstractions and constructs, including permissions and dependency management as written on the slide. Behind the line with grant we have already impemented the IAM and permissions management for many resources.
  19. Let’s now pray to the demo gods to not screw up with me!
  20. Let me recap the demo, by unveiling the current problems - no pain, no gain: Documentation sucks currently - most of the examples are written and prepared for TypeScript only. It has some learning curve especially if you used to CloudFormation. Outside of constructs, the most surprising change is related to parameters. CloudFormation parameters are resolved when deploying, so you can generate a CloudFormation template with parameters, but you cannot deploy it with use of CDK, there is no way to type check/validate that on the code level - instead CDK recommends to use contexts. Again, it is the controversial decision that is a tradeoff. They did that because of compile-time guarantees. You can read more about that here. Even it is generally available, it has no support for StackPolicies. Also on the same note, some things requires override in the resulting CloudFormation, if they are not supported. When it comes to debugging - it is not so user-friendly as handwritten template (which is kinda obvious if we are using it like assembly language), and it may be harder to analyze those. However, it is possible and it just requires practice, nothing else.
  21. Let me wrap up the presentation by talking about possible future enhancements and direction where it can drive us: First they need to work on the documentation, but I think it is a matter of time. The more important thing is that we finally treating Infrastructure as Code. That gives us interesting capabilities and opens new doors for future. A few years back nobody thought that we will configure CI/CD deployment pipelines alongside with the code - we may observe similar trend thanks to such solutions. Additionally starting the discussion about abstraction allows us to think about real solutions for abstracting cloud providers. I think that such frameworks are the first step for that. In future we may observe trends and moves related with the type-safe AWS Infrastructure or describing infrastructure needed for serverless applications in the same language we write the compute layer.
  22. Here you can find most important resources that I have used for preparing the presentation.