AWS

[AWS] AWS CDK (Cloud Development Kit) Basics

brightlightkim 2022. 3. 24. 08:09

What is AWS CDK?

  • Open Source Tool that allows developers to use their favorite programming languages to write.
  • imperative code to generage declarative CloudFormation templates
  • Available in JavaScript, Java, C sharp, Python, C#, and Go
  • Node.js is a requirement

 

CDK Basics

  • CloudFormation?
    • AWS Service that provisions AWS Resources in Stacks
    • A Stack is a collection of AWS Resources
    • Stack Templates are in YAML/JSON format
    • Templates are declarative code
    • Change set >> Create or update resources
  • Layers of a CDK App
    • App: no CloudFormation equivalent
      • Stack: CloudFormation Stack
        • Nested Stack: CloudFormation Nested Stack
        • Construct: 1 (or more) CloudFormation Resources
    • Can have multiple apps
    • Apps can have multiple Stacks
    • "The Output of CDK is cloudFormation"
  • What is a CDK App?
    • App is a special root Construct
    • Orchestrates the lifecycle of the Stacks and Resources whitin it.
    • App Lifecycle: Construct, Prepare, Validate, Synthesize, Deploy.

- Simple use if statement >> simpler

 

- ex: Paper Request unless specify application 

- Helper functions

RESOURCES