An Introduction to AWS Cloud Development Kit – CDK

The introduction of Cloud Development Kit (CDK) by AWS has been a valuable addition to its bouquet of services. CDK is an Infrastructure as Code (IAC) service from AWS. Yes, you could create cloudformation scripts in json or yaml and use it to provision your infrastructure. But who likes to write json files? I have always been averse to developing large json scripts to provision and maintain my infrastructure on AWS. I always wondered why isn’t there a simpler way of doing this – like developing deployment scripts on my favourite programming language.

AWS heard me alright and came up with CDK last year. CDK helps to define infrastructure in code and provision them through Cloudformation. With CDK it’s so much easier to build reusable deployment scripts. Moreover, it facilitates the use of the core features of a programming language in structuring and generating Cloudformation scripts. I decided to take it out for a spin to ascertain whether it really keeps up to its promises. Here, I’ll provide a sneak peek - an example to create a static website on S3.