Lesson 05Read

Deploy it for real

Clone the starter template, cdk deploy in your own account, and see the real farmers market page live.

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

What you already built

Across the last few lessons you wrote the exact pieces this stack needs: a Bucket configured for static hosting (websiteIndexDocument, websiteErrorDocument), then publicReadAccess: true with blockPublicAccess: BlockPublicAccess.BLOCK_ACLS so the objects are actually reachable. The starter template adds the one piece CloudSynth's sandbox can't grade — a BucketDeployment that uploads real HTML to the bucket at deploy time.

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. Seeing a real URL respond means running the CLI against your own account, 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.

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

The deployed site is the Maple Street Farmers Market page — the same scenario s3-01 opened with: a page that needs to stay up without a server to patch, whether it's a quiet Tuesday or a packed Saturday morning.

Local setup

same on macOS · Linux · Windows
1

Clone the template

git clone https://github.com/cloudsynth-templates/s3-static-site.git my-site
2

Enter the folder

cd my-site
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.