Hacker News new | ask | show | jobs
by shepherdjerred 681 days ago
CDK does two things:

- It provides a library in your favorite language to map objects -> CFN YAML

- It provides a command line to deploy that CFN YAML + any needed resources, like Lambda payloads. This is done with `cdk bootstrap` [0]

Mapping objects to YAML is straightforward -- every language has some way to serialize arbitrary objects to YAML. CDK provides level 1 constructs [1] with the allowed CFN types. I use TypeScript, so these types are _super_ helpful, especially with Intellisense. I'm not sure how helpful they are if you're using Python.

Once you have those level 1 constructs, you can build abstractions on top of them. That's what the more complicated L2/L3 constructs are.

Because the end result is CFN YAML, you do still need to understand CFN. CDK just makes the authoring experience significantly more pleasant by eliminating the need to write CFN YAML. You still need to know how to deploy CFN YAML.

[0]: https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html

[1]: https://docs.aws.amazon.com/cdk/v2/guide/constructs.html#con...