Deploy a CDK stack to AWS

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

Social Share Links

Send Tweet
Published 2 years ago
Updated 2 years ago

Time to deploy! Learn how to use the npm run watch command to watch for changes and compile TypeScript to JavaScript.

But, the main thing you'll learn is how to use the cdk deploy command to deploy your app to AWS and then navigate to your app through the AWS web console.

Tomasz Łakomy: [0:00] Let's make sure that we can deploy this empty CDK stack. In order to do that, let us open up the terminal and run npm run watch. This is going to enable TypeScript configuration from TypeScript to JavaScript in watch mode.

[0:13] For instance, if I add this variable, which is a TypeScript variable, because it is of type string, I can see that a JavaScript file was created for me. You can see that it was successfully compiled because there are no types here. With that, I can open up a new terminal tab. Let me remove this bit in the meantime. I'm going to run cdk deploy, in order to deploy this empty stack to AWS.

[0:36] After a couple of seconds, we can see that our stack has been successfully deployed. Let me navigate to AWS Management Console. Next, I'm going to navigate to CloudFormation, in order to make sure that our stack is successfully deployed to CloudFormation. We can see two stacks here. This is the internal CDK one, and this is our stack that we're going to build over the course of this course.

[0:59] If I click over here, I'm going to navigate to Resources, and we can see that our stack has been successfully created. Even though there isn't much here, apart from this AWS CDKMetadata, but this is going to change very soon.

[1:11] Last side note, if you cannot see you're stack over here, make sure that you have selected the proper region in AWS Console.

egghead
egghead
~ 9 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