S3 Core Vocabulary
coreintermediateA bucket is a container; an object (data + metadata) lives inside it, addressed by a unique key. There is no real folder structure — a "prefix" like photos/ is just a shared substring in keys, S3 fakes a folder view over a flat namespace. A bucket policy or IAM policy controls access; versioning keeps every past copy of an object; lifecycle rules move or expire objects automatically over time.
Think of it as
S3 is a giant flat filing cabinet where every folder label you see is actually just a shared prefix printed on file labels — there are no real subfolders, only keys that happen to share a string like "photos/" before the rest of the name.
What we're doing: See that a "folder" in the console is really just objects sharing a key prefix.
- 1
- The key "photos/2026/trip.jpg" is one single string — there is no "photos" or "2026" object or folder actually created.
- 2
- A second object shares the same prefix, which is exactly what makes the console/CLI able to render a folder-like view.
- 3
- This listing works by matching keys that start with "photos/2026/" — it is a prefix query, not a real directory traversal.
Why this works: Understanding that "folders" are a prefix illusion over a flat namespace explains real S3 behavior that trips up POSIX-filesystem intuition — like why renaming a "folder" is actually a full copy-and-delete of every object under that prefix.
Treating an S3 "folder rename" as a fast, atomic operation
Wrong
Better
What you see: A "quick folder rename" on a prefix with millions of objects takes hours and generates significant request costs, surprising anyone expecting filesystem-speed behavior.
Why: Because keys are flat strings and there is no real directory structure, changing a "folder name" means individually copying and deleting every object whose key starts with that prefix — there is no metadata-only operation that can do it instantly.
- Bucket — the container, globally unique name
- Object — data + metadata, addressed by a key
- Key / prefix — the unique identifier — prefixes fake folders
- Bucket policy / IAM — private by default, access explicitly granted
Remember: Bucket = container, object = data + metadata, key = unique identifier. "Folders" are a prefix illusion over a flat namespace — a folder rename is really a copy-then-delete of every object under that prefix. Private by default; verify, don't assume.
See also: consistency durability and availability · identity vs resource based access

