CDK

Commands

  • cdk synth

    • generating CloudFormation template based on code

  • cdk bootstrap

    • aws profile should have cloudformation:CreateChangeSet permission

    • install bootstrap stack into an environment

  • cdk deploy

    • deploy cdk app

  • cdk diff

    • diff between CDK app and whats currently deployed

Notes

  • each CDK stack maps 1:1 with CloudFormation stack

  • Construct - basic building block of CDK app. Has a constructor with params (scope, id, props)

    • scope - most likely always the value is this

    • id - local identity of the construct. CDK uses this id to calculate the CloudFormation Logical ID

    • props - [optional], set of init properties. Specific to each construct

Last updated