Slide 1

Slide 1 text

Presented by Rumesh Hapuarachchi Automating Infrastructure with AWS CDK

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Infrastructure as Code

Slide 5

Slide 5 text

Infrastructure as Code Repetable & Predictable Same tools as your code Replicating environments for better testability

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

AWS Cloud Development Kit (AWS CDK)

Slide 8

Slide 8 text

Engineers love coding • Languages which they already know • Java, JS, TS, Python, Go, C# • Existing tools & workflows • Abstractions • Libraries • Use logics when defining your infrastrucure

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

From code to cloud "Source" "Compiler" "Assembly Language" "Processor"" synthesize deploy AWS CF CF Template CDK CLI

Slide 12

Slide 12 text

AWS CDK Main Components • Core Framework (App, Stacks, Resources) • AWS Construct Library • AWS CDK CLI

Slide 13

Slide 13 text

Construct Levels Image Credits: Sebastian Korfmann

Slide 14

Slide 14 text

99x.io npm install -g aws-cdk

Slide 15

Slide 15 text

Commands • cdk init • cdk synth • cdk diff • cdk deploy • cdk destroy

Slide 16

Slide 16 text

Let's Build Our First App

Slide 17

Slide 17 text

99x.io Testing?

Slide 18

Slide 18 text

Isn't that same as Jest? Testing with CDK • Snapshot tests • Fine-grained assertions • Validation tests

Slide 19

Slide 19 text

Show me some code?

Slide 20

Slide 20 text

Best Practices • Layer your application to reduce blast radius • Use multiple, isolated environments for dev, test, stage and prod • Smaller files • Make use of Parameter Store and Secrets Manager • Do not overengineer

Slide 21

Slide 21 text

Helpful Resources • https://cdkpatterns.com/ • https://github.com/cdk-patterns/serverless • https://docs.aws.amazon.com/cdk/api/latest/docs/aws- construct-library.html

Slide 22

Slide 22 text

99x.io Thank You rehrumesh [email protected]