Skip to content

ONE QUESTION. YOUR REASONING.

Design Amazon Lockers

Design Amazon Lockers: a package is assigned a locker at a site near the customer, the customer gets a pickup code, and unclaimed packages expire.

System designShopping, tickets and bookingMid-level

YOUR BRIEF

What to work through

Work through amazon Lockers as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.

  • Assign a free locker of the right size at the chosen site when a package ships there
  • The driver opens the assigned locker and confirms the drop-off
  • The customer gets a pickup code and opens the locker with it
  • A package not picked up by its deadline expires and goes back for return

BEFORE YOU START

Constraints to discuss

  • One locker never holds two packages: assignment is strongly consistent
  • Pickup codes are single use and hard to guess
  • A site keeps opening lockers for valid codes through a short network outage
Need a starting point?

Watch for these common gaps as you prepare:

  • Checking that a locker is free and reserving it in two steps, so two packages get one locker
  • Reservations with no expiry, so missed deliveries hold lockers forever
  • Guessable or reusable pickup codes
  • Turning it into a class diagram and never reaching the concurrency or the outage
Read: System design questions and who asks them

Why this question is in the collection

These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.

KEEP GOING

Your next question

Storage, files and linksDesign BitlyInfrastructure and platformDesign a rate limiterInfrastructure and platformDesign an A/B testing platformInfrastructure and platformDesign an ad click aggregator
Browse the collection
01

Pick a question

Read the brief and choose what you want to work on.

02

Talk it through

Explain your thinking. Respond to follow-ups. Draw when a design needs it.

03

Find your next improvement

Use the feedback from your interview to decide what to practise next.