Skip to content
System Design Explorer
Company architectureintermediate

Amazon S3 System Design

Object storage for hundreds of trillions of objects on millions of disks

By Ankur NayakReviewed

How Amazon S3 stores hundreds of trillions of objects: a REST front end, a namespace service for object metadata, and a storage fleet of millions of hard disks. Objects are erasure-coded into shards and deliberately spread across different drives, so no disk runs hot and one customer's burst can be served by over a million disks.

Open in Studio· edit a copy
Users
Tens of thousands of customers on millions of drives
Storage
Hundreds of trillions of objects (2025)
Objects
Hundreds of trillions
Objects in 2017
~1 trillion
Hard disks
Millions
One burst served by
1M+ disks
Amazon S3 system design architecture diagramComponents: Application (SDK / HTTP), Front-End Fleet (REST API), Metabucket, Namespace Service, Storage Fleet (Hard disks), Replication Service, Tiering Service, Repair & Rebalance. Connections: Application to Front-End Fleet (PUT / GET / LIST); Front-End Fleet to Metabucket (bucket config); Front-End Fleet to Namespace Service (key → location); Front-End Fleet to Storage Fleet (shards); Replication Service to Storage Fleet (read new objects); Tiering Service to Storage Fleet (move class); Repair & Rebalance to Storage Fleet (rebuild shards).ApplicationSDK / HTTPFront-End FleetREST APIMetabucketNoSQL databaseNamespace ServiceNoSQL databaseStorage FleetHard disksReplication ServiceWorkerTiering ServiceWorkerRepair & RebalanceWorker

Requirements

Functional

  • PUT, GET, LIST and DELETE objects in buckets over an HTTP REST API
  • Return the latest version immediately after a write, and include it in listings
  • Replicate objects and move them between storage tiers
  • Store objects of any size, from bytes to terabytes

Non-functional

  • Extreme durability: designed around an 11 nines model
  • Elastic throughput: any workload can burst far beyond its average
  • Isolation: one customer's load mustn't slow another's
  • Strong read-after-write consistency without extra cost or lower availability

In depth

A pretty big storage system

Amazon S3 is the archetypal object store: put bytes under a key, get them back later. Its scale is hard to picture. In 2017 S3 crossed a trillion objects; by March 2025 it held hundreds of trillions of objects across 36 regions. It is built from millions of hard disks and, as of 2023, hundreds of microservices.

S3's internals are less documented than Spanner's or DynamoDB's, but Andy Warfield, a Distinguished Engineer on S3, has described the main shape in two posts on Werner Vogels's blog: one from 2023 based on his FAST '23 keynote, and one from 2025. This page sticks to what they and AWS's announcements say, and marks the rest as inferred.

Four parts

At the top level, S3 is:

  • a front-end fleet that serves the HTTP REST API
  • a namespace service that tracks object metadata: which keys exist and where their data is
  • a storage fleet full of hard disks
  • a fleet of background data services, such as replication and tiering

Bucket metadata is handled separately from the much larger object namespace, by a system called Metabucket. It has been rewritten for scale as S3 raised the long-standing limit of 100 buckets per account.

The physics of hard drives

The design is shaped by an awkward fact: hard drives keep getting bigger but not faster. A drive can do about 120 random operations per second, while capacity has improved 7.2 million times since IBM's first disk drive. As drives grow, the I/O available per terabyte shrinks: Warfield projects that with 200 TB drives, S3 would get one I/O per second per 2 TB of data.

So S3 can't give any one workload "its" disks. A customer storing a petabyte on a few dozen dedicated drives would get only a few thousand operations per second. Instead S3 spreads every workload thinly across a huge number of disks.

Erasure coding and placement

Each object is protected with erasure coding. An algorithm such as Reed-Solomon splits the object into k "identity" shards and generates m parity shards. As long as any k of the k + m shards are available, the object can be read. That survives m failures for far less storage than keeping several full copies.

Placement is the clever part. S3 intentionally puts different objects onto different sets of drives. Each customer's data occupies only a tiny part of any one disk, which isolates workloads from each other, and because one customer's objects are spread so widely, a burst of requests can be served by over a million individual disks. Warfield describes this in terms of heat: if requests concentrate on a few drives, those hot spots slow everything that touches them. Spreading data deliberately keeps heat even. Tens of thousands of customers have buckets spread across millions of drives.

Strong consistency

For its first fourteen years S3 was eventually consistent: right after a write, a read or a listing might not show it yet, and analytics systems carried workaround code and extra databases. On 1 December 2020 AWS announced that S3 delivers strong read-after-write consistency for all GET, PUT and LIST operations, for all objects in all regions, automatically and at no extra cost, "without changes to performance or availability". After a successful write, overwrite or delete, any subsequent read returns the latest version, and listings reflect the change.

AWS hasn't published how the namespace achieves this. The 2025 post says customer reaction was stronger than the team expected, with builders talking about deleting code and simplifying their systems.

ShardStore and correctness

On each storage node runs ShardStore, a storage layer the team wrote in Rust for type safety. They check it with what they call lightweight formal verification: a simplified executable model of ShardStore's logic, also in Rust and about 1% of the real system's size, against which the real implementation is automatically tested.

That reflects how S3 thinks about durability. Disks fail every day at this scale, and erasure coding handles that statistically: the famous "11 nines" model. But software bugs and operational mistakes aren't in that model. So any change that could affect durability goes through a durability review, borrowed from security's threat models: a summary of the change, a comprehensive list of threats, and how each is mitigated.

Failures

  • A disk dies. Its shards are gone, but every affected object still has at least k shards elsewhere, so reads continue. A background repair (whose internals aren't public) re-creates lost shards.
  • Heat concentrates. Placement across different drive sets is the defence; S3 manages heat across the fleet continuously.
  • A bad change. Durability reviews and verification are designed to stop it before it ships.

The trade-offs

Erasure coding saves storage but means every read and repair touches several disks. Spreading data thinly gives isolation and enormous burst capacity, but makes placement and rebalancing a permanent engineering problem. Moving to strong consistency removed a whole class of customer bugs, at the price of hard work in the metadata path. And investing in Rust and verification costs effort up front in exchange for confidence when changing code that holds the world's data.

DynamoDB archives its logs and backups to S3, and Netflix is one of many designs that keep their media in object storage. See also object storage.

What to take into an interview

  • Separate the front end, the metadata (namespace) and the data (storage fleet)
  • Erasure-code large data; replicate only small or hot data
  • Spread every customer across many disks to avoid hot spots and isolate tenants
  • Make strong read-after-write consistency the default if you can
  • Treat durability as a process as well as a number: reviews, threat models and verification

Components

Application

SDK / HTTP

Client. Any program reading and writing objects through S3's REST API.

Front-End Fleet

REST API

API gateway. The fleet that serves S3's HTTP REST API and turns each request into calls to the namespace and storage services.

Metabucket

NoSQL database. The bucket metadata system, separate from the much larger namespace that tracks object metadata. Rewritten for scale as bucket limits rose from 100 per account.

Namespace Service

NoSQL database. Tracks object metadata: which keys exist in each bucket and where their data lives. Since December 2020, reads and lists reflect every successful write immediately.

Why: Listing and lookup need an index that is far smaller and faster than the data itself.

Storage Fleet

Hard disks

Object storage. Millions of hard disks. Objects are erasure-coded into k + m shards, and different objects are placed on different sets of drives so heat spreads evenly and each customer occupies a tiny slice of any disk.

Why: Hard drives are big but slow (about 120 random operations per second each). Only spreading every workload across a huge number of them gives both capacity and throughput.

Building block: Erasure Coding, Object Storage

Erasure Encoder

Reed-Solomoninferred

Service. Splits the object into k identity shards and computes m parity shards.

k Identity Shards

Object storage. Written to k drives chosen from a different set than neighbouring objects use.

m Parity Shards

Object storage. Written to m further drives. As long as any k of the k + m shards survive, the object can be read.

ShardStore

Rust

NoSQL database. The per-disk storage layer, written in Rust and checked with lightweight formal verification against a model about 1% of its size.

Replication Service

Worker. One of the background 'data services': copies objects to other buckets or regions as configured.

Tiering Service

Worker. Another background data service: moves objects between storage classes based on rules or access patterns.

Repair & Rebalance

inferred

Worker. Rebuilds lost shards from surviving ones and rebalances data as drives are added and retired.

Replica Bucket (Other Region)

inferred

Object storage. A bucket in another AWS region that receives replicated copies of objects.

Request flows

PUT an object

  1. The application sends PUT /bucket/key with the object's bytes.
  2. The bucket's configuration is looked up in Metabucket.
  3. The object is erasure-coded into k + m shards written to drives across the storage fleet.
  4. The key and the location of its shards are recorded in the namespace.
  5. 200 OK. Any GET or LIST from now on sees the new object.

GET while a disk is down

  1. The application asks for an object one of whose drives has just failed.
  2. The namespace returns the latest version and where its shards live.
  3. Any k of the k + m shards are read; the missing one isn't needed.
  4. The object is reconstructed and returned as normal.
  5. In the background, the missing shard is rebuilt on a healthy drive.

A customer's analytics burst

  1. A big job suddenly reads a whole dataset at once.
  2. Because that customer's objects are spread thinly over a vast number of drives, the burst lands on over a million disks, none of them hot.

Failure scenarios

What if: disks fail every day?

With millions of drives, failures are constant. Each object's shards are on independent drives and any k of k + m rebuild it, so a single failure never makes data unreadable; repair re-creates lost shards before more are lost.

User impact: None.

  • Erasure coding with m parity shards
  • Fast background repair
  • Durability modelled statistically (11 nines)

What if: heat concentrates on a few drives?

If many requests focus on a small number of drives, those hot spots slow everything that touches them. S3 places different objects on different sets of drives so that heat is spread evenly and any one customer is a tiny part of each disk's load.

User impact: Without spreading, latency spikes for whoever shares the hot drives.

  • Deliberate placement across drive sets
  • Rebalancing as new drives arrive

What if: a software change threatens durability?

Bugs, not disks, are the scariest threat. Changes that could affect durability go through a durability review, modelled on a security threat model, and ShardStore's code is checked automatically against a much smaller reference model.

User impact: Ideally none: the process exists to stop the change before it ships.

  • Durability reviews with threat lists
  • Lightweight formal verification
  • Rust for memory and type safety

Trade-offs

Erasure coding over full replication

Store each object as k + m shards rather than several full copies.

Pros
  • Much less raw storage for the same durability
  • Reads can use any k shards
Cons
  • Encoding cost
  • Repairs and reads touch many drives

Spread every workload thinly

Place different objects on different sets of drives instead of giving customers dedicated hardware.

Pros
  • Bursts can use a million disks
  • Natural workload isolation
  • No hot drives
Cons
  • Placement and rebalancing must be managed carefully at huge scale

Strong consistency by default

Make every GET and LIST reflect the latest successful write, for all objects, at no extra cost.

Pros
  • Customers deleted workaround code and extra databases
  • Analytics on S3 became simpler and correct
Cons
  • Hard engineering in the metadata path, done after years of eventual consistency

Invest in correctness tooling

Rewrite the storage node in Rust and verify it against a small executable model.

Pros
  • Bugs caught before they threaten data
  • Engineers can change code with confidence
Cons
  • Building and maintaining the model and checks

Frequently asked questions

How does Amazon S3 store data?

Requests go through a front-end fleet with a REST API; a namespace service tracks object metadata; and the data lives on a storage fleet of millions of hard disks. Each object is erasure-coded into shards spread across different drives, and background services handle replication and tiering.

Is Amazon S3 strongly consistent?

Yes, since December 2020. After a successful write, overwrite or delete, any subsequent read returns the latest version, and LIST operations reflect the change immediately. AWS made it automatic for all objects in all regions at no extra cost.

Why does S3 spread objects across so many disks?

A hard disk can do only about 120 random operations per second. Placing different objects on different sets of drives keeps any single disk from running hot, isolates customers from each other, and lets one customer's burst draw on over a million disks at once.

What is ShardStore?

ShardStore is the storage layer S3 runs on each disk. It was written in Rust for type safety, and the team checks it with lightweight formal verification against a simplified model of its logic that is about 1% of the real system's size.

Building blocks used

Sources