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

Introduction to Cloud Development Kit

Introduction to Cloud Development Kit

Siddharth Balyan

February 14, 2022
Tweet

More Decks by Siddharth Balyan

Other Decks in Programming

Transcript

  1. ❯ whoami Student aspiring to be security researcher / engineer

    Part of null’s Cloud Security Study Group Have been diving into Cloud and Cloud Native as a result 2 2
  2. Topics Covered Infrastructure as Code AWS Cloud Development Kit CDK

    Constructs CDK Stacks Mini-project: URL Shortener service 3 3
  3. Infrastructure as Code Process of managing of infrastructure through code

    instead of manual process. Going throug the AWS Console to create one EC2 instance is tiring enough, imagine doing it for 50 EC2 Instances, a Load Balancer, API Gateways and much much more. Hence, it’s just easier to write down what you want and have AWS do it automatically. 4 4
  4. AWS CloudFormation CloudFormation is the original tool for IaC by

    AWS. Allows you to define the infrastructure using JSON and YAML. Example of CFN to deploy a WordPress instance 6 6
  5. Configuration file based IaC have some drawbacks: 1. It’s hard

    to write JSON or YAML files 2. The power of a programming language is not utilized Enter CDK, a software development framework with support for Python, Java, JS, TS etc. Better than just declarative config files 7 7
  6. CDK Constructs It is the basic building block of AWS

    CDK applications. Can be a single resource; AWS S3 bucket. Can be higher level abstraction consisting of multiple resources, like Lambda linked to DynamoDB More details and info here and here A construct represents a cloud component and encapsulates eveything AWS needs to create the component 8 8
  7. 9 9

  8. CDK Stacks A unit of deployment in AWS CDK is

    a stack. A CDK stack is a combination of all the constructs we have defined in our application. cdk ls Allow us to manage all cloud components (ie constructs) as a single unit CDK App <— entrypoint for CDK Stacks <— contain all the constructs (components) 10 10