Static Site on S3 + CloudFront — Challenge
27 minBeginner
This creates billable resources. Run it in a dev environment and destroy it when you finish. Set a budget alarm first.
You are done when
0 of 5
The goal#
Achieve the same outcome as Static Site on S3 + CloudFront, from an empty starting point, without the steps.
You need to put a static site on the internet, on HTTPS, cheaply, and without leaving a bucket open to the world.
This is the architecture EgyKode itself runs on — the page you are reading is served exactly this way, so the Terraform in infrastructure/terraform/production/ is the finished version of what you are about to build by hand.
What must be true when you are done#
- The site loads over HTTPS on the CloudFront domain.
- The bucket is private — a direct S3 URL returns AccessDenied, and only CloudFront can read it.
- Fingerprinted assets return
max-age=31536000, immutable; HTML revalidates. Content-Encoding: bris present on an HTML response.- Everything created is deleted at the end, verified by listing.
Rules#
- Do not open the guided lab until you are finished, or until you have been stuck on the same thing for 20 minutes. Being stuck is the exercise; staying stuck is not.
- Official documentation is allowed and encouraged. In the job it is the first thing you open.
- Verify every criterion yourself with a command whose output you can read. "It looks right" is not a check.
If you get stuck#
Work in layers rather than restarting things:
- What did you expect to happen, exactly?
- What happened instead — the error text, not a paraphrase?
- Which layer is that error from?
- What is the smallest command that proves the layer below is fine?
That sequence is the skill this tier exists to build. The commands are lookup-able; the sequence is not.