Install AWS Cloud Development Kit (CDK) and Create a New Project

Tomasz Łakomy
InstructorTomasz Łakomy
Share this video with your friends

Social Share Links

Send Tweet
Published 7 months ago
Updated 6 months ago

All amazing projects have to start somewhere and AWS CDK is no exception. In this quick lesson we're going to learn how to install AWS CDK command line interface with npm as well as how to use cdk init in order to create our very first CDK project :partying_face:

Instructor: [0:00] To get started with AWS CDK, we are going to run npm install -g aws-cdk. We can run CDK --version to verify which CDK version are we on. You will probably see a newer version on your machine, but what matters here is that we are running CDK version 2.

[0:17] Let me create a new directory for our project. I'm going to cd into it, and here I'm going to run cdk init to create a new CDK project.

[0:26] We can see that we have three available templates to choose from. I'm going to go with sample-app. I'm going to run cdk init sample-app, and I'm going to choose language, which is going to be equal to typescript.

[0:39] This command has done the following. It has created a brand-new git repository for us, executed npm install, and created a brand-new CDK App, which contains an Amazon SQS queue that is subscribed to an SNS topic.

[0:51] Let me open up a code editor. Here, we can see that the CDK command-line interface has created a brand-new project for us. Let's take a look at package.json. Here, we can see that the CDK version is exactly the same as we have installed before using the command line interface.

[1:06] In order to verify that the whole project has been configured successfully, I'm going to run the build command. I'm going to open up the terminal and run npm run build. With all of that in place, we can see that there are no warnings, there are no errors, and we are ready to get started.

egghead
egghead
~ 10 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today