https://kvs-vishnu23.medium.com/is-aws-cdk-better-than-terraform-85194e7a42cd
- A neat explanation of how CDK works compared with Terraform
- The examples demonstrate well how HCL can be a bit clumsy
https://jsherz.com/aws/cdk/terraform/2023/04/29/terraform-vs-cdk.html
- Biggest concern regarding CDK seems to be state management and people changing managed infrastructure manually in AWS Console leading to CDK not knowing the truth
- Mentions https://github.com/cdklabs/cdk-nag that should be part of CDK
https://betterdev.blog/aws-cdk-pros-and-cons/
- Constructs seen as productivity boosters
- Using a programming language can get out of hand; should be treated as any other code (who would have thought..)
- Concurrency used to be a problem; a related issue was merged in 2022 that allows concurrent runs
https://www.youtube.com/watch?v=D4Asp5g4fp8 - AWS CDK Crash Course for Beginners
- A decent hands-on introduction to Cloud Development Kit (CDK)
- Useful CDK CLI commands
cdk init
for starting a projectcdk deploy
for deployments – local example showncdk synth
produces a CloudFormation template from CDK app & stackscdk bootstrap
must be run if the AWS account has not used CDK yetcdk watch
updates changes to a live environment in AWS - this looks a bit sketchy
- About constructs
- Low-level L1 constructs start with
Cfn*
e.g.CfnBucket
- Higher-level L2 constructs are the ones that should be used most of the time
- Low-level L1 constructs start with
https://www.youtube.com/watch?v=T-H4nJQyMig - AWS Cloud Development Kit (CDK) Crash Course
- An easy to follow introduction to CDK, a bit more theoretical
- Highlights
- L1 constructs equal to CloudFormation declarations
- L2 constructs offer sensible defaults for L1 constructs
- L3 constructs combine multiple other constructs
cdk bootstrap
deploys a CDKToolkit CloudFormation stack