Lesson 9 of 30
S3 has already shown up as someone else's supporting cast in this track — the bucket CloudFront caches, the bucket a Lambda function reads from. This lesson is S3 on its own terms: what an object store actually is, and the one thing it can do entirely by itself.
12 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
In the S3 console, a bucket shows what looks like nested folders: `images/2024/avatar.png`. What is actually happening under the hood?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
S3 (Simple Storage Service) is object storage: it holds objects (files, of any size or type) inside buckets, each object addressed by a key — a string like images/avatar.png. That's the whole model. There's no real directory tree underneath it, no file permissions in the Unix sense, no partial writes — just buckets, keys, and the bytes behind each key.
Two things sit on top of that simple model and matter in practice:
A bucket with static website hosting enabled gets its own website endpoint, a document configured as the index document (served for /), and one configured as the error document (served for anything not found). Point a browser at that endpoint and the bucket serves HTML, CSS, and JS directly — no server, no Lambda, nothing running at all.
This is genuinely different from the setup this track's CDN lesson describes, where S3 is the origin behind CloudFront. Static website hosting mode is what S3 can do entirely on its own: serve files over plain HTTP, from one region, to whichever bucket policy makes the objects public. It has no HTTPS of its own, no custom domain without extra DNS work, and no caching at the edge — which is exactly why real production sites still put CloudFront in front of a bucket even though the bucket is technically capable of serving the site by itself.
/ characters — images/2024/avatar.png is one flat key, not a file three directories deep. There's no operation that "moves a folder" the way a filesystem has one; renaming a prefix means copying every object under it to new keys and deleting the old ones."Would you serve this static site straight from an S3 website endpoint, or put CloudFront in front of it?" tests whether a candidate knows S3 alone can technically host a site, but also knows precisely what it's missing (HTTPS, a custom domain, edge caching) — and that the secure production answer is a private bucket behind CloudFront, not a public bucket serving directly.