NBTL
Published in

NBTL

Getting started with AWS CDK

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.

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:

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:

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:

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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mart Noten

A builder from the https://www.nbtl.blog writing technical articles focussing on cloud technologies.