← Amazon Interview Insights

Amazon·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Apr 2026

Summary

Amazon system design round for a software engineer role. The whole session was basically one big design question about tracking perishable inventory across a retail network, with the interviewer pushing hard on scaling and data store justification. Felt like I was playing catch-up the whole time.

Questions Asked (9)

Q1

Design a backend service that tracks perishable items across a retail store network and can report where any given item is at any point in time, including whether it's on a shelf or has been moved to a storage area after expiration.

System DesignData ModelingAPI & Integrations
Author's notes

I started with the API shape which was probably the right call, but I spent too long debating the data model before nailing down what the actual read patterns were.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a data model that tracks item state and location with time-series or event-sourced updates. Propose a distributed architecture with APIs for updates and queries, ensuring consistency and low-latency reads. Finally, discuss trade-offs and optimizations for handling perishability and network-wide queries.

Pro tip: Emphasize the importance of event-driven architecture with a durable log (like Kafka) to capture all item movements, enabling auditability and real-time reporting. Also, consider using a hierarchical location model (store > area > shelf) to simplify queries and updates.

1. Clarify Requirements and Scale

Ask questions to understand the scale (number of stores, items, update frequency), consistency needs, and query patterns. Define functional and non-functional requirements.

2. Design Data Model and Storage

Propose a schema that captures item identity, location, state (on shelf, in storage), and timestamps. Consider using a combination of a relational database for current state and a time-series or event store for history.

3. Define APIs and Integration

Design RESTful or gRPC APIs for updating item location/state and querying current/historical location. Include endpoints for batch updates and real-time notifications.

4. Architect for Scalability and Reliability

Propose a distributed system with microservices, message queues for asynchronous processing, and caching for hot data. Discuss partitioning by store or region to scale horizontally.

5. Address Perishability and Expiration

Explain how to track expiration dates and automatically trigger moves to storage. Discuss background jobs or event-driven processes that monitor expiration and update item states.

Key Points to Mention

  • Event sourcing or change data capture for auditability and real-time updates
  • Data partitioning and sharding strategies to handle large-scale item tracking
  • Consistency models (strong vs eventual) and their trade-offs for location accuracy
  • Caching strategies (e.g., Redis) for low-latency reads of current item locations
  • Handling expiration: TTL-based triggers, scheduled jobs, or stream processing
  • API design considerations: idempotency, pagination, and rate limiting

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

What clarifying questions would you ask before diving into the design? Specifically around what an 'item' means, where expiration events come from, and how fresh the read results need to be.

System DesignAdaptability & Ambiguity
Author's notes

This tripped me up a bit because I jumped to asking about QPS before asking the more fundamental question of whether an item ID represents a single physical unit or a SKU with quantity.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Demonstrate a structured approach to requirements gathering by first identifying the core ambiguities around 'item', expiration events, and read freshness. Then, ask targeted questions that clarify the data model, event sources, and consistency requirements, while showing how each answer impacts design decisions. Finally, summarize assumptions and confirm with the interviewer before proceeding.

Pro tip: Frame your questions to show you're thinking about trade-offs: e.g., 'If reads need to be strongly consistent, we might need a different architecture than if eventual consistency is acceptable—can you clarify the freshness requirement?' This demonstrates you're not just gathering requirements but also connecting them to design implications.

1. Clarify the definition of 'item'

Ask what constitutes an item: is it a product, a user session, a cache entry, or something else? Understand its attributes, uniqueness, and lifecycle.

2. Identify sources of expiration events

Determine where expiration events originate: are they generated by a timer, external system, user action, or data change? Understand the volume, frequency, and reliability of these events.

3. Define read freshness requirements

Ask about consistency needs: must reads always reflect the latest state (strong consistency), or is eventual consistency acceptable? What is the tolerable staleness?

4. Explore scale and performance expectations

Inquire about the number of items, read/write throughput, and latency requirements to inform partitioning, caching, and storage choices.

5. Summarize and confirm assumptions

Restate your understanding of the requirements and assumptions to ensure alignment before diving into the design.

Key Points to Mention

  • Data model: what fields define an item, and how are items identified?
  • Event sources: push vs. pull, batch vs. real-time, and handling of missed events.
  • Consistency models: strong vs. eventual consistency, and read-your-writes guarantees.
  • Scale: expected number of items, read/write QPS, and data size.
  • Latency: acceptable read and write latencies, and impact on user experience.
  • Failure handling: what happens if expiration events are delayed or lost?

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How would you design the GET endpoints for this system, and what does the underlying data model look like to support both a locate-by-item lookup and a per-store listing filtered by status?

API & IntegrationsData ModelingSystem Design
Author's notes

Went with two endpoints: one for item location by ID, one for listing a store's items with an optional status filter.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the functional requirements and access patterns: locate-by-item (likely a global lookup by item ID) and per-store listing filtered by status (a range query on store + status). Then propose RESTful GET endpoints that map to these patterns, and design a data model that supports efficient queries, considering indexing and partitioning strategies.

Pro tip: At Amazon, always discuss how your design scales and handles failure; mention partitioning by store ID or item ID to distribute load, and consider using a NoSQL store like DynamoDB with GSIs for the per-store status query.

1. Clarify requirements and access patterns

Ask about expected read/write ratio, data volume, latency requirements, and whether the locate-by-item is global or store-specific. Confirm the status values and whether filtering is exact match or range.

2. Define RESTful GET endpoints

Propose endpoints like GET /items/{itemId} for locate-by-item and GET /stores/{storeId}/items?status={status} for per-store listing. Discuss pagination, sorting, and error handling.

3. Design the data model

Model items with attributes like itemId, storeId, status, and other metadata. Consider a primary key of itemId for locate-by-item, and a secondary index on storeId+status for the per-store query.

4. Choose storage and indexing strategy

Select a database (e.g., DynamoDB, Cassandra) that supports the access patterns. Use a global secondary index (GSI) for storeId+status, and discuss partition key design to avoid hot partitions.

5. Address scalability and consistency

Explain how the design scales horizontally, handles eventual consistency, and meets latency SLAs. Mention caching, read replicas, and monitoring.

Key Points to Mention

  • RESTful endpoint design with clear resource naming and query parameters
  • Data model with itemId as primary key and storeId+status as a composite key for the listing
  • Use of secondary indexes (e.g., DynamoDB GSI) to support efficient queries
  • Partitioning strategy to distribute load and avoid hot spots
  • Pagination and filtering for large result sets
  • Consideration of consistency models and caching for performance

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

Should you use a relational database or a NoSQL store for this system, and why? If you say consistency is the reason to go relational, justify it on more than just ACID.

Technical Trade-offsSystem DesignData Modeling
Author's notes

This was the hardest part of the interview.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's requirements—data model, access patterns, scale, and consistency needs—then evaluate relational vs. NoSQL against those. Avoid a binary answer; instead, propose a polyglot approach if appropriate, and justify consistency beyond ACID by discussing business impact, developer productivity, and operational complexity.

Pro tip: At Amazon, always tie your choice to customer experience and business metrics—e.g., 'strong consistency prevents double-charging customers, which is non-negotiable'—and mention that you'd validate with a prototype or load test before committing.

1. Clarify requirements

Ask about data structure, query patterns, scale, latency, and consistency requirements. Identify if the system needs multi-object transactions or flexible schema.

2. Evaluate relational fit

Discuss how relational databases provide strong consistency, mature tooling, and complex query support. Justify consistency beyond ACID by linking to business invariants (e.g., financial correctness) and developer efficiency.

3. Evaluate NoSQL fit

Discuss how NoSQL offers horizontal scalability, flexible schemas, and high write throughput. Note trade-offs like eventual consistency and limited query flexibility.

4. Consider hybrid or polyglot

Propose using both if different parts of the system have different needs (e.g., relational for transactions, NoSQL for session data). Explain how to manage complexity.

5. Make a recommendation and justify

Choose one based on the most critical requirement, and justify consistency beyond ACID by discussing business impact, operational maturity, and team expertise.

Key Points to Mention

  • ACID vs. BASE: explain that ACID ensures atomicity, consistency, isolation, durability, but consistency in CAP theorem is about linearizability.
  • Business impact of consistency: e.g., preventing double-spending, maintaining referential integrity, or ensuring accurate inventory counts.
  • Access patterns: relational excels at ad-hoc queries and joins; NoSQL requires denormalization and known access patterns.
  • Scalability: relational scales vertically (and with sharding), NoSQL scales horizontally out of the box.
  • Operational complexity: relational has mature tooling and backups; NoSQL may require custom monitoring and eventual consistency handling.
  • Team expertise and ecosystem: consider existing skills and integration with other services.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

With millions of items, running a full table scan every few minutes to find what has expired will destroy your database. How do you design the expiration pipeline to avoid that?

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

Honestly the most interesting part of the whole session.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the problem with full table scans and propose an indexing strategy that allows efficient range queries on expiration timestamps. Then describe a pipeline that uses a background process to periodically query only expired items, possibly with batching and rate limiting, and discuss trade-offs between different approaches.

Pro tip: Mention that you would use a time-ordered index (like a B-tree on expiration time) and that you would consider using a distributed scheduler like Amazon EventBridge or a queue-based system to trigger expiration checks, ensuring scalability and fault tolerance.

1. Identify the problem

Explain why full table scans are inefficient and costly, especially at scale, and why an alternative is needed.

2. Propose an indexing strategy

Suggest creating an index on the expiration timestamp column to enable efficient range queries for expired items.

3. Design the expiration pipeline

Describe a background job or service that periodically queries the index for items with expiration time <= now, processes them in batches, and deletes or archives them.

4. Address scalability and reliability

Discuss how to handle large volumes (e.g., sharding, rate limiting, distributed workers) and ensure the pipeline is fault-tolerant and doesn't impact production traffic.

5. Consider trade-offs and alternatives

Mention trade-offs like index maintenance overhead, eventual consistency, and alternative approaches such as TTL in NoSQL databases or lazy deletion.

Key Points to Mention

  • Index on expiration timestamp (e.g., B-tree) to avoid full scans
  • Batch processing and rate limiting to avoid overwhelming the database
  • Use of a distributed scheduler or queue (e.g., Amazon SQS, EventBridge) for triggering expiration jobs
  • Sharding or partitioning to scale horizontally
  • Monitoring and alerting for pipeline health and performance
  • Trade-offs: index write overhead vs. read efficiency, eventual vs. immediate consistency

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q6

How does your read path scale to handle millions of requests, potentially in spikes?

System DesignTechnical Trade-offs
Author's notes

Cache in front of locate-by-ID since item location changes rarely relative to how often it's read.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the read path architecture and scale requirements (e.g., QPS, latency, data size). Then walk through a layered scaling strategy: caching, read replicas, partitioning, and asynchronous processing, explaining trade-offs at each layer. Finally, address spike handling with autoscaling, load shedding, and backpressure.

Pro tip: Quantify the impact of each technique (e.g., 'caching reduces DB load by 90%') and mention how you'd monitor and iterate, showing a data-driven mindset that Amazon values.

1. Clarify Requirements

Ask about expected read QPS, latency SLOs, data size, consistency needs, and spike patterns to scope the problem.

2. Design Core Read Path

Outline the basic flow: client -> CDN/edge -> load balancer -> service -> cache -> database, highlighting where bottlenecks occur.

3. Apply Scaling Techniques

Layer in caching (client, CDN, application, database), read replicas, sharding/partitioning, and denormalization to distribute load.

4. Handle Spikes

Describe autoscaling, queue-based load leveling, rate limiting, and graceful degradation to absorb traffic bursts.

5. Discuss Trade-offs and Monitoring

Explain consistency vs. availability, cost vs. performance, and how you'd monitor and adjust the system over time.

Key Points to Mention

  • Caching strategies (TTL, invalidation, write-through vs. write-back) and their impact on consistency
  • Read replicas and eventual consistency trade-offs
  • Database sharding/partitioning and query optimization
  • Autoscaling and elastic load balancing
  • Rate limiting, circuit breakers, and backpressure
  • Monitoring, metrics, and continuous improvement

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q7

How would you handle a move event that arrives out of order or gets submitted twice?

System DesignTechnical Trade-offs
Author's notes

Blanked for a second.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, such as the expected event volume, latency, and consistency needs. Then propose a solution that combines idempotency, sequencing, and reconciliation to handle out-of-order and duplicate events. Finally, discuss trade-offs and how you would validate the solution.

Pro tip: Emphasize that idempotency and ordering are separate concerns: idempotency handles duplicates, while ordering handles sequence. Mention that you would use a combination of techniques rather than a single silver bullet.

1. Clarify Requirements

Ask about the event source, expected volume, latency requirements, and consistency model (e.g., eventual vs. strong). This ensures your solution aligns with business needs.

2. Design for Idempotency

Ensure that processing the same event multiple times has no additional effect. Use unique event IDs, idempotency keys, or deduplication stores.

3. Handle Out-of-Order Events

Use sequence numbers, timestamps, or versioning to detect and reorder events. Consider buffering, windowing, or stateful processing to wait for missing events.

4. Implement Reconciliation

Periodically reconcile state with the source of truth to correct any inconsistencies caused by missed or delayed events.

5. Discuss Trade-offs

Explain the trade-offs between latency, complexity, and consistency. For example, buffering increases latency but improves ordering.

Key Points to Mention

  • Idempotency keys or unique event IDs to deduplicate
  • Sequence numbers or versioning to detect out-of-order events
  • Event time vs. processing time and watermarking
  • Dead-letter queues for unprocessable events
  • Reconciliation jobs to fix inconsistencies
  • Trade-offs between strong and eventual consistency

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q8

If the product team wants a full location history per item as an audit trail, how does your data model change and what's the storage cost implication?

Data ModelingSystem Design
Author's notes

Append-only event log instead of a single mutable row, with a separate materialized view or cache for current state.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: what constitutes a location change, how often it occurs, and the retention period. Then, propose a data model change that separates current location from historical location, using an append-only event log or time-series table. Finally, estimate storage cost based on event frequency, payload size, and retention, and discuss trade-offs like compression and tiered storage.

Pro tip: Quantify the storage cost with a concrete example (e.g., 'If an item moves 10 times per day, with 1KB per event, that's 3.65GB per year per item') to show you think in terms of scale and cost, which is highly valued at Amazon.

1. Clarify Requirements

Ask questions to understand what triggers a location event, the expected frequency, required retention period, and query patterns (e.g., audit vs. real-time).

2. Propose Data Model Changes

Suggest adding a new table or collection for location history, with fields like item_id, timestamp, location, and metadata. Consider using an append-only log or time-series database.

3. Estimate Storage Cost

Calculate storage per event, multiply by events per item per day, number of items, and retention days. Include overhead for indexing and replication.

4. Discuss Trade-offs and Optimizations

Mention compression, tiered storage (hot vs. cold), and partitioning strategies to manage cost and performance. Also consider impact on write throughput and query latency.

Key Points to Mention

  • Separation of current location and historical location to avoid impacting read performance on the main item table.
  • Use of append-only event log or time-series database for efficient writes and time-based queries.
  • Storage cost calculation: events per day * size per event * retention period * number of items.
  • Compression and columnar storage to reduce storage footprint.
  • Tiered storage (e.g., S3 Glacier for old data) to lower costs for long-term retention.
  • Partitioning by time or item_id to improve query performance and manageability.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q9

How do you keep the locate-by-ID cache consistent when a move event is recorded? Walk through the trade-offs between write-through, invalidate-on-write, and a short TTL approach.

Technical Trade-offsSystem Design
Author's notes

Write-through keeps cache fresh but adds latency to the write path.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system context: what the cache is used for, the consistency requirements, and the expected read/write patterns. Then compare write-through, invalidate-on-write, and short TTL across dimensions like consistency, latency, complexity, and failure modes. Finally, recommend a hybrid approach (e.g., invalidate-on-write with a short TTL as a safety net) and justify it based on the specific requirements.

Pro tip: Emphasize that cache consistency is not just about the happy path—discuss failure scenarios like cache update failures, network partitions, and concurrent writes. Show that you understand the trade-offs between consistency and availability, and that you can choose the right approach based on business needs.

1. Clarify requirements and context

Ask about read/write ratio, consistency requirements (strong vs eventual), latency SLAs, and the cost of stale data. This determines which trade-offs are acceptable.

2. Explain each strategy

Briefly describe write-through (update cache on write), invalidate-on-write (delete cache entry on write), and short TTL (cache entries expire quickly). Mention how each handles a move event.

3. Analyze trade-offs

Compare strategies on consistency, latency, complexity, and failure modes. For example, write-through ensures cache is always fresh but adds write latency; invalidate-on-write is simple but can cause cache misses; short TTL bounds staleness but may serve stale data within TTL.

4. Recommend a solution

Propose a hybrid approach, such as invalidate-on-write combined with a short TTL as a fallback, and explain why it balances consistency and performance for the given requirements.

5. Address edge cases and monitoring

Discuss handling of concurrent writes, cache failures, and how to monitor cache hit rate and staleness. Mention idempotency and retry mechanisms.

Key Points to Mention

  • Read/write ratio and access patterns (e.g., read-heavy vs write-heavy)
  • Consistency requirements: strong vs eventual consistency, and tolerance for stale data
  • Latency impact: write-through adds write latency; invalidate-on-write may cause read misses; TTL adds no write overhead but bounds staleness
  • Failure modes: cache update failures, network partitions, and how to handle them (e.g., retries, fallback to database)
  • Concurrency: race conditions between cache updates and reads, and use of versioning or locking
  • Monitoring: cache hit rate, staleness metrics, and alerting on inconsistencies

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.