So much busy work they’ve created around their platform.
So much busy work they’ve created around their platform.
For context I've been able to take thousands of lines of CloudFormation YAML and replace it with around 500 lines of much clearer and easier to read JavaScript. And that 500 lines automatically builds five Lambda functions, builds, pushes, and launches two Docker images that run in AWS Fargate, configures an API Gateway and a CloudFront distribution.
CDK is really a game changer in terms of allowing developers to take an idea and turn it into infrastructure as code extremely quickly and properly (CDK automatically generates many best practices like minimal IAM roles, minimal security group settings, etc)
https://docs.aws.amazon.com/CDK/latest/userguide/what-is.htm...
Unfortunately it does still appear to be in preview.
In CloudFormation its always a 1:1 mapping: one CloudFormation resource typed out as YAML, one resource created on your AWS account. In CDK you can make something like "LoadBalancedFargateService" and just plug in the path to your local Dockerfile, and it builds and uploads the image to ECR, makes a Fargate service, makes a load balancer, connects the service to the load balancer, and returns the URL to you.
The other power of CDK is it sets things up right out of the box. Rather than having to explicitly created all your autoscaling rules it can create sensible default ones for you automatically. It also automatically creates the right IAM rules, and security group rules that you would otherwise have to define manually.
As a whole I'd say comparing CloudFormation and CDK is like comparing assembly language and C++. You could write your code as a bunch of hand rolled ASM for the most control, but realistically that's not feasible for large projects as its error prone, slow, and quickly gets unwieldly. CDK is like higher level C++ that synthesizes back down into the lower level assembly language that creates all those cloud resources