Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building cloud infrastructure with AWS CDK

Avatar for Mahesh Mahesh
April 30, 2020

Building cloud infrastructure with AWS CDK

AWS CDK is a service provided by AWS to build infrastructure as code. And this is tech talk designed to cover the basics of AWS CDK with a small demonstration on how to build cloud infrstucture with AWS CDK using a preferred programing language.

Avatar for Mahesh

Mahesh

April 30, 2020
Tweet

More Decks by Mahesh

Other Decks in Technology

Transcript

  1. Available options ▰ AWS API ▰ CloudFormation scripts ▰ Other

    infrastructure as code software tools (ex: Terraform) 3
  2. WHAT? 5 ▰ Software development framework ▻ Javascript, Typescript, Java,

    C#, F#, Python ▰ Provides a high level object oriented abstraction of AWS services
  3. WHY? 6 ▰ Use logic when defining your infrastructure ▰

    Use object oriented concepts to create a model of your infrastructure ▰ Organize your project into logical modules ▰ Share and reuse your infrastructure as a library ▰ All the advantages your IDE provides (ex: Code completion, code refactoring, inline documentation, etc.)
  4. CONSTRUCT 8 ▰ Basic building block in CDK which represents

    a cloud component ▰ AWS CDK construct library for basic constructs ▰ Two types, ▻ Low level constructs ▻ High level constructs ▰ Construct patterns
  5. STACK 9 ▰ Basic deployment unit in CDK ▰ Implemented

    using Cloud Formation Stack ▰ All constructs belong to a Stack construct
  6. APP 10 ▰ Root of the construct tree ▰ Used

    as scope for stack constructs ▰ Contains single or multiple stacks
  7. DEMO 13 ▰ Prerequisite: ▻ AWS Account & IAM User

    ▻ AWS CLI ▻ Node.js >= 10.3.0 ▻ Favourite IDE ▰ Install AWS CDK ▻ `npm install -g aws-cdk`
  8. DEMO 15 ▰ CDK INIT - Initialize the app ▰

    CDK SYNTH - Produce AWS Cloudformation script ▰ CDK DIFF - Show difference between infrastructure currently in code and deployed infrastructure ▰ CDK DEPLOY - Deploy current code as infrastructure into AWS
  9. IF YOU’RE INTERESTED 16 ▰ AWS CDK Intro Workshop ::

    AWS Cloud Development Kit (AWS CDK) Workshop ▰ What Is the AWS CDK? - AWS Cloud Development Kit (AWS CDK) ▰ AWS re:Invent 2018: Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) ▰ Infrastructure is Code with the AWS CDK - AWS Online Tech Talks ▰ API Reference · AWS CDK