infrastructure is code with the aws cloud development kit · infrastructure is code with the aws...
TRANSCRIPT
![Page 1: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/1.jpg)
Infrastructure Is Code with the AWS Cloud Development Kit
Richard BoydSoftware Engineer and Developer AdvocateAWS Developer Tools
![Page 2: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/2.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda• Our infrastructure management journey• The AWS Cloud Development Kit (AWS CDK)• Demo: Build an AWS CDK app• A lot more to explore
![Page 3: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/3.jpg)
![Page 4: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/4.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scripted
🤔 What happens if an API call fails?🤔 How do I make updates?🤔 How do I know a resource is ready?🤔 How do I roll back?
Scripted
Manual
High level
Low level
![Page 5: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/5.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Resource provisioning engines
AWS CloudFormation template
(JSON/YAML)
HashiCorp Configuration Language (HCL)
Desired state configuration
Declarative
Scripted
Manual
High level
Low level
👍 Easy to automate👍 Reproducible😩 Configuration syntax😩 No abstraction, lots of details
![Page 6: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/6.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Document Object Models (DOMs)Troposphere Python
SparkleFormation Ruby
GoFormation Go
…
if statements, for loops, IDE benefits
Ex: 218 lines of Troposphere for a VPC
AWS CloudFormation
Template
👍 Real code ♥👍 Desired state😩 Abstraction is not built-in
DOMs
Declarative
Scripted
Manual
High level
Low level
![Page 7: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/7.jpg)
![Page 8: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/8.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CloudFormation
template
AWS CDK application
Stack(s)
Construct Construct
AWS CDK
Componentized
DOMs
Declarative
Scripted
Manual
High level
Low level
Resources
![Page 9: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/9.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CDK
Componentized
DOMs
Declarative
Scripted
Manual
High level
Low level
![Page 10: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/10.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Componentized
DOMs
Declarative
Scripted
Manual
High level
Low level
AWS CDK
![Page 11: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/11.jpg)
![Page 12: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/12.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Demo – Goals• CDK concepts• CDK CLI workflow• AWS construct library
HelloCdkStack
event source
SQS QueueNew Tweets
CloudWatch Logs
console.log
send-message
![Page 13: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/13.jpg)
![Page 14: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/14.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Demo recap
CloudFormation Template
“compiler”
CDK CLI
“processor”“assembly language”
“source”
synthesize deployexecutes
Get started:npm install -g aws-cdkcdk init --language <typescript | java | csharp | ...>
![Page 16: Infrastructure Is Code with the AWS Cloud Development Kit · Infrastructure Is Code with the AWS Cloud Development Kit Richard Boyd Software Engineer and Developer Advocate AWS Developer](https://reader035.vdocuments.us/reader035/viewer/2022071001/5fbdd194f4138365a04d2f61/html5/thumbnails/16.jpg)
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Next steps• Try out the CDK• https://cdkworkshop.com• https://awslabs.github.io/aws-cdk• https://github.com/awslabs/cdk-reinvent
• Engage with us• https://github.com/awslabs/aws-cdk• https://gitter.im/awslabs/aws-cdk