FOUNDING PRICING · 40% OFFfor the first 1,000 members · from ₹95/month
OutageAmazon Web Services10 min read

AWS S3 2017 Outage Explained: One Wrong Input to a Command

How one mistyped input to a maintenance command took Amazon S3 offline in US-EAST-1 for four hours in February 2017, and what AWS changed afterwards.

ShareXLinkedInWhatsApp
An aerial view from an aircraft window of large, flat-roofed data centre buildings and electrical substations spread among roads and housing near Ashburn in Northern Virginia.
An aerial view from an aircraft window of large, flat-roofed data centre buildings and electrical substations spread among roads and housing near Ashburn in Northern Virginia. Photo: Theodore Christopher, CC0, via Wikimedia Commons.

On 28 February 2017, an engineer on the Amazon S3 team ran a routine command to take a few servers out of service. One input to that command was wrong, far more servers were removed than intended, and S3 in the Northern Virginia region (US-EAST-1) stopped answering requests. It took 4 hours and 17 minutes for the service to return to normal.

The command is the part everyone remembers. The more useful lessons are in what happened next: why losing servers forced two core subsystems into a full restart, why that restart took hours, and why AWS could not even update its own status page.

A diagram of a capacity removal command with one wrong input: the intended target is a few servers in a billing-related subsystem, but a larger set is removed from the index and placement subsystems, which GET, LIST, DELETE and PUT requests depend on, so S3 in US-EAST-1 cannot serve requests while both restart.

What broke for users, and when

S3 is an object store: you give it a key and some bytes, and later you ask for the bytes back by key. By 2017 many websites and apps kept images, uploads, static site files, backups and application data in it, and The Register described US-EAST-1 as one of the most popular AWS regions.

When S3 in that region stopped serving requests, anything that read from or wrote to a bucket there began to fail. The Register's report on the day listed trouble at Trello, Quora, Medium, Slack, Imgur, Docker's registry and Heroku among many others, and noted that Nest said its cameras and app were not working properly. It also mentioned many publications that kept their images and other media in S3.

The damage also spread inside AWS. According to Amazon's own summary, these services in the region were affected while the S3 APIs were unavailable:

  • the S3 console,
  • new instance launches on EC2,
  • EBS volumes, when they needed data from a snapshot stored in S3,
  • AWS Lambda.
A row of large grey windowless data centre buildings with cooling units on their roofs, behind a black security fence beside a road in Ashburn, Virginia.
Data centre buildings in Ashburn, Virginia, photographed in 2020 and described on Wikimedia Commons as Amazon Web Services facilities. Photo: Vahurzpu, CC BY-SA 4.0, via Wikimedia Commons.

All times in the table are Pacific Standard Time, as given in the AWS summary.

Time (PST)What happened
Before 09:37The S3 team is debugging a problem that is making the S3 billing system run slower than expected.
09:37An authorised team member, following an established playbook, runs a command to remove a small number of servers. One input is entered incorrectly and a larger set is removed.
09:37 onwardsThe index and placement subsystems lose too much capacity and need a full restart. S3 in the region cannot serve requests.
11:37AWS becomes able to update individual service statuses on its Service Health Dashboard again.
12:26The index subsystem has enough capacity to start serving GET, LIST and DELETE requests.
13:18The index subsystem is fully recovered. GET, LIST and DELETE work normally.
13:54The placement subsystem finishes recovering. PUT works again and S3 is operating normally.

Other AWS services then worked through backlogs that had built up during the disruption, so some of them took longer to return to normal.

A timeline for 28 February 2017 in PST: GET, LIST and DELETE are unavailable from 09:37 until the index starts serving at 12:26 and are normal from 13:18, PUT is unavailable until placement recovers at 13:54, and per-service status dashboard updates are impossible until 11:37.
Four hours and 17 minutes, operation by operation

The two subsystems that went down

The servers removed by mistake supported two S3 subsystems that AWS names in its summary.

The index subsystem manages the metadata and the location information for every object in the region. Think of it as the catalogue of a very large library. The books (your bytes) sit on shelves across many machines, and the index is what knows which shelf holds which book. AWS states that this subsystem is needed to serve all GET, LIST, PUT and DELETE requests. Without the catalogue, the data is intact on disk but nobody can find it.

The placement subsystem decides where new data should be stored. It is used during PUT requests to allocate storage for new objects, and it needs a working index subsystem to operate correctly.

That dependency sets the order of recovery. The index had to come back first. Only then could placement recover. This is why reads came back at 12:26 but writes had to wait until 13:54.

One point is worth stating clearly: the AWS summary describes a loss of availability, and says nothing about stored objects being lost. The catalogue was unreachable for a few hours.

Root cause: a tool that did exactly what it was told

Removing servers is not an unusual thing to do. AWS says it builds its systems on the assumption that things will fail, and that removing and replacing capacity is one of its core operational processes, used since S3 launched. The subsystems are designed to lose a significant amount of capacity with little or no effect on customers.

So the problem was one of degree. There is a floor below which a subsystem cannot keep working, and the command took the index and placement subsystems below it. AWS has not published the command, the input, or the number of servers involved, so anyone claiming to know the exact typo is guessing.

What AWS did publish is its own diagnosis of the tool: it allowed too much capacity to be removed, too quickly. Nothing in the tool compared the request with the minimum each subsystem needed. An illustration of the missing check (this is not AWS's code) looks like this:

def remove_capacity(subsystem, servers_to_remove):
    remaining = subsystem.active_servers - len(servers_to_remove)
    if remaining < subsystem.minimum_required:
        raise Refused("would take subsystem below its safe minimum")
    for batch in small_batches(servers_to_remove):
        drain(batch)
        wait_and_check_health(subsystem)   # slow enough to stop in time

The first three lines are a guard. The loop is a rate limit. Either one alone would probably have turned the incident into a non-event: the guard by refusing the request, the rate limit by giving a human or an alarm time to notice before the floor was reached.

Notice what AWS did not do. It did not blame the engineer, who was authorised and following the playbook. A system that a single wrong argument can take down has a design problem, and the fix belongs in the design.

Why the restart took hours

A full restart should be a known quantity. Here it was not, for a reason that applies to almost every long-lived system.

AWS wrote that it had not completely restarted the index subsystem or the placement subsystem in its larger regions for many years. In that time S3 had grown enormously. Bringing these subsystems back involves safety checks that validate the integrity of the metadata, and the time for those checks grows with the amount of metadata. The restart procedure existed, but nobody had recent evidence of how long it took at the current size, and the answer turned out to be longer than expected.

This is a general trap. Steady-state operations get exercised every day, so their performance is well understood. Cold-start paths run rarely, so they quietly drift out of date as the system grows. You find out how slow they have become on the day you need them.

The status page that depended on the outage

While this was happening, the AWS Service Health Dashboard was not showing the problem against S3. From the start of the event until 11:37 PST, AWS could not update the status of individual services on the dashboard, because the dashboard's administration console itself depended on Amazon S3.

During those two hours AWS used its Twitter account and a banner at the top of the dashboard to tell customers what was going on.

A monitoring or communication system that shares a dependency with the thing it reports on will fail at exactly the moment it is needed. The same idea shows up in interviews as a design question: where do you host your status page, your alerting and your runbooks, so that they survive the outage they describe?

A dependency diagram with the unavailable S3 APIs in US-EAST-1 on the left and five dependants on the right: the S3 console, EC2 new instance launches, EBS volumes needing snapshot data, Lambda, and the Service Health Dashboard admin console, which could not post per-service status until 11:37 PST.
What depended on S3 inside AWS

What AWS said it changed

  • The tool removes capacity more slowly. A mistake now unfolds over a longer period, which gives people and alarms time to react.
  • The tool has a floor. Safeguards prevent capacity from being removed when that would take any subsystem below its minimum required level.
  • Other tools are being audited. AWS said it was checking its other operational tools for the same kind of safety check.
  • Faster recovery through smaller cells. AWS describes splitting services into small partitions it calls cells, so that each one can be tested and restarted quickly. The S3 team had already planned to partition the index subsystem further later that year, and moved that work up to start immediately.
  • The dashboard runs across regions. The Service Health Dashboard administration console was changed to run across multiple AWS regions.

The computer science underneath

Object storage is a metadata problem. Storing bytes on disks is the easy half. The hard half is the mapping from a key to wherever those bytes live, kept consistent across a huge fleet. The lesson on object storage and blobs covers buckets, keys and metadata from the user's side, and designing a storage cluster goes inside: how placement chooses machines across failure domains and why scaling the metadata layer is its own problem. This outage is that lesson in practice. The data layer was fine and the metadata layer was not, so the whole service was down.

Blast radius and cells. If one failure can take out a whole region's index, the unit of failure is the region. If the index is split into independent cells, the same mistake takes out one cell and a fraction of customers, and a restart involves a fraction of the metadata. Bulkheads, cells and graceful degradation explains the pattern and its costs. It is the main structural fix AWS chose.

Hidden dependencies and regions. Many affected customers ran in a single region, and the AWS dashboard depended on the service it was reporting on. Multi-region and disaster recovery deals with both: how to decide what you can afford to lose, and how to find dependencies that only show themselves during a failure.

Blameless analysis. The AWS summary is a compact example of the approach in incident response and blameless post-mortems: it says what the person did, treats that as an expected event, and asks what in the system allowed a small error to have a large effect.

What an interviewer could ask from this

The engineer made a typo. Is that the root cause? No. People will always make input mistakes. The cause that can be fixed is that the tool accepted a request that took a subsystem below its minimum capacity, and did it fast.

How would you make a dangerous operational command safe? Validate the request against a minimum-capacity floor, act in small batches with health checks between them, cap how much one invocation can change, and show a dry run of exactly what will be affected before acting.

Why did reads recover before writes? Reads need only the index subsystem. Writes also need the placement subsystem, which depends on the index and could only start recovering once the index was working.

Why did a restart take hours when the system handles failures all the time? Routine failures replace a few servers while the rest stay up. A full restart had not been done in the larger regions for years, the metadata had grown, and the integrity checks at start-up scaled with it.

How do cells reduce the impact of an incident like this? Each cell is an independent copy of the service for a subset of data or customers. A fault or a restart is confined to one cell, and a small cell restarts and can be tested far faster than a region-sized system.

Where should a status page be hosted? On infrastructure that shares as little as possible with the system it reports on: a different region or provider, with no dependency on the primary storage, DNS or authentication.

Takeaways

  • The trigger was one wrong input, but the outage was caused by a tool with no lower limit and no rate limit.
  • In an object store the metadata index is the critical path. If it is down, intact data is still unreachable.
  • Recovery paths that are never exercised get slower as the system grows, and nobody notices until they are needed.
  • Smaller cells limit both how much breaks and how long it takes to bring back.
  • Status pages and other emergency tools must not depend on the thing whose failure they announce.

Sources

  1. AWS: Summary of the Amazon S3 Service Disruption in the Northern Virginia (US-EAST-1) Region
  2. The Register: AWS's S3 outage was so bad Amazon couldn't get into its own dashboard to warn the world

Written by the Codevizag Academy team

An independent explainer built from the public sources listed above. Codevizag Academy is not affiliated with Amazon Web Services. Found a mistake? Write to support@codevizag.com.

More case studies

Understood it? Now prove it.

The lessons behind this case study are free, and 20 problems a month are judged on real test cases at no cost.

Start solving free