Module 2 · Create and deploy your first CDK appRead

Bootstrap and deploy for real

Clone the finished project, cdk deploy in your own account, and find the real bucket in the console.

Everything so far ran inside CloudSynth's sandbox — real cdk synth, but never a real cdk deploy. This lesson closes that gap: clone a finished copy of the project and deploy it in your own AWS account.

What you already built

A couple of lessons ago you ran cdk init and got a real, empty CDK app on your own machine. The one piece that's still only in the browser sandbox is the code itself — the versioned Bucket you wrote in the last lesson. The starter template below is that same project with that exact code already in place, so there's nothing to copy-paste by hand: clone it, and you're ready to deploy.

Why this can't run in the browser

The sandbox synthesizes your code and asserts against the resulting CloudFormation — it never holds AWS credentials and never calls cdk deploy. Turning that into a real bucket in a real account means running the CLI with your own credentials, so this step is deliberately outside the sandbox's trust boundary: no CLI check-in, no server-side tracking of whether you actually deployed. Clone it, read it, run it.

cdk synth (what the sandbox has been doing all along) and cdk deploy (what you're about to do for the first time) are two different phases — synth is pure translation, no AWS calls; deploy is the one that actually creates resources.

Heads up: cdk deploy provisions a real S3 bucket in your AWS account. cdk destroy when you're done to avoid ongoing storage charges (they're small, but they're real).

What you'll see

cdk deploy prints a BucketName output when it finishes. Open the S3 console and find it — the exact bucket your code described, now real. Every project from here builds on exactly this cycle: write a construct, synth it, deploy it, see it land in your account.

Local setup

same on macOS · Linux · Windows
1

Clone the template

git clone https://github.com/cloudsynth-templates/cdk-onboarding.git my-first-cdk-app-final
2

Enter the folder

cd my-first-cdk-app-final
3

Install dependencies

npm install
4

Deploy to your account

npx cdk deploy

First deploy in a fresh account or region? Run npx cdk bootstrap once first — see what you'll need →. Tear it all down later with npx cdk destroy.