1

I'm following the workshop provided by aws, https://cdkworkshop.com/20-typescript/30-hello-cdk/300-cdk-watch.html. When I issue

$ cdk watch

After the command is succeeded, it never returns. I can see that the new function is deployed correctly on the aws console. But it seems like it didn't finish normally. When I issue

$ cdk deploy --hotswap

I get no error. It deploys and returns cleanly.

Anyone knows or experiences the same?

enter image description here

Libertatem
  • 71
  • 1
  • 6

1 Answers1

3

This is the expected behaviour. "watch mode (cdk deploy --watch, or cdk watch for short) continuously monitors your CDK app's source files and assets for changes and immediately performs a deployment of the specified stacks when a change is detected".

Watch mode is a common CLI idiom. Typescript's tsc --watch, works similarly, for instance, continuously compiling to js as you make changes.

fedonev
  • 20,327
  • 2
  • 25
  • 34