Preparing your design workspace

Loading the problem and your latest saved attempt…

Design an Amazon Locker System

Design a reliable locker network for package allocation, driver deposit, secure customer pickup, expiry, and recovery from failures.

Problem statement

Design an Amazon Locker system. A delivery driver must deposit a package into an appropriately sized compartment, and the customer must retrieve it using a one-time pickup code.

The system should manage multiple compartment sizes, validate access codes, expire stale allocations and pickup credentials, notify customers, and remain correct when allocation, deposit, pickup, or notification operations are retried.

State any traffic, geography, capacity, and expiry assumptions because the source does not supply numeric targets.

What to build

  1. The system allocates an available compartment that can fit a package at a selected locker location.
  2. An authorized delivery driver can open the allocated compartment, deposit the package, and record the deposit outcome.
  3. After a successful deposit, the system issues an expiring one-time pickup code and notifies the intended customer.
  4. The customer can present a valid pickup code to open only the compartment holding their package and complete pickup.
  5. The system expires stale allocations and pickup credentials, records state transitions, and supports recovery of uncollected packages.

At scale

  • Source fact: locker locations contain compartments of multiple sizes, and allocation must choose a compartment that can fit the package.
  • Source fact: driver deposit, one-time-code pickup, expiry, notifications, concurrency, availability, and failure behavior are part of the interview scope.
  • The source does not provide numeric traffic, locker-fleet size, or retention targets; candidates must state and justify these assumptions.
  • The exact allocation policy, pickup-code lifetime, and uncollected-package return policy are not specified and should be clarified or bounded by the candidate.