Getting started with AWS CDK

Mart Noten


AWS CDK is here to stay. It allows you to define your cloud application resources using familiar programming languages. If AWS is a toolbox, CDK is the machinery to operate it. It is not for nothing that CTO of Amazon Werner Vogels spend this 15 minute video trying to outlay what it exactly does, and why it is great to use.

Amazon CTO, Werner Vogels, on AWS CDK

This post is a summary of our original on the NBTL blog. Stuck on a certain step and looking for more context? Interested in learning more about cloud technologies? Check out our full catalog and original post here.

How do you get started?

You might have clicked this post in order to learn how to get started with CDK. We will follow the official documentation which can be found here: “Getting started with the AWS CDK”

Installing the AWS CLI

Firstly, you will need to have the AWS CLI installed and configured. Want to check if you have? Try if you can run the following command and if it returns you S3 buckets:

aws s3 ls

No command? No CLI.

Install the AWS CLI per documentation. It’s really easy and should only take a minute or two.

No buckets? No configuration.

Create an IAM user in the AWS Console. Give it a user name and check the box for Access key — Programmatic access. Select Attach existing policies directly and select AdministratorAccess: click next untill you see Success and the access keys. (Only do this if you want to live on the edge and make your security department upset)

Use configure command and enter the information from the IAM user screen:

aws configure

Try executing the aws cli again, and you should now get your S3 buckets listed.

Installing AWS CDK

With the AWS CLI setup you can now install the CDK using Node Package Manager:

npm install -g aws-cdk

Run the following command to verify correct installation and print the version number of the AWS CDK.

cdk --version



Mart Noten
Editor for

AWS Architect from the writing technical articles focussing on cloud technologies.