Sub topic 1
What Object Storage Is and Where S3 Fits
Prerequisites
This chapter assumes you can use a command line, know what an HTTP request and a REST API are, and have a general idea of what an AWS account and an IAM user or role are. Later chapters use short Python snippets, so basic Python reading ability helps. This chapter has no code to run.
Three ways to store data
Computers store data in three common models. Each one exposes the data differently and suits different work.
| Model | You work with | Typical AWS service | Good for |
|---|---|---|---|
| Block storage | Fixed-size blocks on a virtual disk | Amazon EBS | Operating system disks, databases |
| File storage | Files in folders on a shared file system | Amazon EFS, Amazon FSx | Shared directories, legacy applications |
| Object storage | Whole objects addressed by a key, over HTTP | Amazon S3 | Backups, logs, media, data lakes, static assets |
Block storage behaves like a disk attached to one server. You format it and the operating system decides how to lay out files. File storage adds a shared directory tree that many servers can mount. Object storage drops both ideas. You send a whole object to a service with an HTTP request, and you get the same whole object back later.
What an object is
An object is a unit of data plus the information that describes it. It has three parts:
- The data itself, which can be any sequence of bytes, from a few bytes up to 5 TB.
- A key, which is the object's unique name inside its bucket.
- Metadata, which is a set of name-value pairs such as content type and last-modified time.
A bucket is the container that holds objects. Every object lives in exactly one bucket. Later chapters cover buckets, keys and prefixes in detail.
Object storage has no real folders. A key such as reports/2026/report.csv looks like a path, but it is a single flat string. The console shows folders by grouping keys on the / character.
How you use it
You talk to S3 through its API. Each request is an HTTP call, and the main operations are PUT to store an object, GET to read it, LIST to find keys and DELETE to remove one. The AWS CLI and the SDKs, such as boto3 for Python, wrap these calls.
Objects are written and replaced as a whole. You cannot open an object and change bytes in the middle. To change one, you upload a new copy under the same key. This is the main difference from a file system or a disk, and it shapes which workloads fit.
Where S3 fits
S3 is a good choice when data is written once and read many times, when you need very large capacity, or when many clients must reach the same data over HTTP. Common uses are:
- Backups and archives.
- Application logs and analytics data.
- Images, video and downloadable files for websites.
- Input and output for data processing jobs.
S3 is a poor choice in other cases:
- A database or operating system disk that needs fast small in-place writes. Use block storage.
- A shared directory that applications mount and edit with normal file operations. Use a file service.
- Data that changes a few bytes at a time. Each change would rewrite the entire object.
Common mistakes
- Treating S3 as a mounted drive. Tools that mount buckets as file systems exist, but they translate file operations into whole-object requests, so performance and behavior differ from a real disk.
- Expecting folders to exist. An empty "folder" is only a key that ends in
/, or nothing at all. - Appending to an object. S3 has no append. You replace the whole object.
Exercise
A team wants to keep a growing log file by appending one line at a time, and also wants to store nightly backups of that file. Which parts fit S3 and which do not, and why?
Show answer
The nightly backups fit S3, because each backup is a whole object written once and read rarely. The append-one-line workload does not fit, because S3 cannot modify part of an object or append to it. Each change would replace the whole object. The live log should stay on block or file storage, or be written in separate small objects, and S3 can hold the finished copies.