Module 2 · Create and deploy your first CDK appRead

Scaffold your first CDK project

cdk init generates a working, empty app — bin/entry point, stack file, and config, ready for your first construct.

With the toolchain installed and your CLI pointed at the right credentials, you're ready to create a real, empty CDK app — one command generates the whole scaffold.

Create a project folder

mkdir my-first-cdk-app
cd my-first-cdk-app

Initialize the app

cdk init app --language typescript

What you got

  • bin/my-first-cdk-app.ts — the entry point. Instantiates your stack inside a CDK App.
  • lib/my-first-cdk-app-stack.ts — where your stack's resources actually get defined. This is the file you'll edit in the next lesson.
  • cdk.json — tells the CDK CLI how to run your app (which file to execute, plus feature-flag context).
  • package.json / tsconfig.json — ordinary npm/TypeScript project config.

Everything else cdk init generated (tests, .gitignore, lockfiles) is either housekeeping or out of scope for this project. The one file that matters next is your stack file — that's where you'll write your first construct.