← Amazon Interview Insights

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

Senior
Jun 2026

Summary

Amazon system design round for a software engineer role. The whole session was basically one giant question about building a ticket selling platform, and they wanted you to go deep on pretty much every layer of the stack.

Questions Asked (7)

Q1

Design an extensible event ticket system that supports concerts, movies, and sports events. Walk through creating events, managing inventory, holding and purchasing seats with idempotency, and handling refunds.

System DesignData ModelingAPI & Integrations
Author's notes

This question is a lot.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design a flexible data model that abstracts common event attributes while allowing type-specific extensions. Walk through the core flows—event creation, inventory management, seat holding, purchasing with idempotency, and refunds—focusing on consistency, concurrency, and failure handling. Emphasize trade-offs and justify choices based on Amazon's scale and reliability needs.

Pro tip: Explicitly discuss how you would handle idempotency for payment operations using idempotency keys and conditional writes, and how you'd prevent double-booking with optimistic concurrency or distributed locks. Also, mention monitoring and alerting for inventory discrepancies and failed refunds.

1. Clarify Requirements and Scope

Ask questions to understand expected scale (events per day, concurrent users), consistency requirements, and supported payment methods. Define functional and non-functional requirements, including extensibility for new event types.

2. Design Data Model and Storage

Propose a schema that separates common event data from type-specific attributes (e.g., using a JSON column or subtype tables). Model seats, inventory, holds, orders, and refunds with appropriate indexes and sharding strategy.

3. Design APIs and Core Flows

Outline RESTful APIs for creating events, managing inventory, holding seats, purchasing, and refunding. Detail the sequence of operations for each flow, including validation, locking, and idempotency mechanisms.

4. Address Concurrency and Idempotency

Explain how to prevent race conditions during seat holds and purchases using optimistic locking, distributed locks, or conditional writes. Describe idempotency key handling for payment and refund operations to avoid duplicates.

5. Discuss Scalability, Reliability, and Extensibility

Cover partitioning, caching, and asynchronous processing for high throughput. Discuss failure recovery, monitoring, and how the design accommodates new event types without major changes.

Key Points to Mention

  • Idempotency keys for payment and refund APIs to ensure exactly-once processing.
  • Optimistic concurrency control (e.g., version numbers) or distributed locks to prevent double-booking.
  • Data model extensibility using a base event table with type-specific extensions (e.g., JSON column or joined tables).
  • Inventory management with seat maps, holds with TTL, and atomic decrement of available seats.
  • Refund handling including policy enforcement, asynchronous processing, and reconciliation.
  • Scalability considerations: sharding by event ID, caching event details, and using queues for high-volume operations.

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

Q2

How would you design the class and interface structure so that new ticket types can be added without changing existing code? Describe a factory or registration mechanism that supports this.

System DesignTechnical Trade-offs
Author's notes

Talked through a registry pattern where each ticket type registers itself with a central factory at startup.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining a clear interface for ticket types, then explain how a factory or registration mechanism can instantiate new types without modifying existing code. Emphasize the Open/Closed Principle and how this design supports extensibility and maintainability.

Pro tip: Mention that at Amazon, where services evolve rapidly, this pattern reduces deployment risk and enables teams to add features independently. Also, discuss how you would handle configuration and testing for new ticket types.

1. Define a common interface

Create an interface (e.g., Ticket) that declares methods all ticket types must implement, such as process(), validate(), or getPriority(). This ensures polymorphism and decouples clients from concrete implementations.

2. Implement concrete ticket types

Each ticket type (e.g., BugTicket, FeatureTicket) implements the interface. New types are added as new classes without altering existing ones, adhering to the Open/Closed Principle.

3. Introduce a factory or registry

Use a factory method or a registry (e.g., a map from type identifier to creator function/class) to instantiate tickets. The factory can be configured or self-registering, so adding a new type only requires registering it, not changing factory logic.

4. Integrate with client code

Client code depends only on the interface and the factory/registry. It requests a ticket by type identifier and receives an object implementing the interface, remaining unaware of concrete classes.

5. Discuss trade-offs and extensibility

Highlight benefits like scalability and maintainability, and mention potential drawbacks such as increased indirection or complexity. Explain how the design supports testing and dynamic addition of types.

Key Points to Mention

  • Open/Closed Principle: classes should be open for extension but closed for modification.
  • Factory Method or Abstract Factory patterns for object creation.
  • Registry pattern: a map or dictionary that associates type identifiers with creation logic.
  • Dependency Injection to decouple client code from concrete implementations.
  • Configuration-driven or plugin-based registration for dynamic extensibility.
  • Trade-offs: added complexity vs. flexibility, and impact on performance and testing.

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

Q3

Prices need to be determined by pluggable strategies so each ticket type can have its own pricing logic, like dynamic pricing, fees, or discounts. How do you architect that?

System DesignPricing & MonetizationTechnical Trade-offs
Author's notes

Strategy pattern, pretty standard.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a strategy pattern-based architecture where each ticket type maps to a pricing strategy. Discuss how to compose strategies for dynamic pricing, fees, and discounts, and address extensibility, performance, and testing.

Pro tip: Emphasize idempotency and auditability of pricing decisions, as pricing changes can have financial and customer trust implications. Also, mention the importance of a fallback strategy to handle errors gracefully.

1. Clarify Requirements and Constraints

Ask about expected ticket types, pricing rules, frequency of changes, and performance requirements. Understand if pricing needs to be real-time or batch, and any compliance or audit needs.

2. Define a Pricing Strategy Interface

Design an interface with a method like `calculatePrice(context)` that takes a pricing context (e.g., ticket type, user, time) and returns a price. This allows pluggable implementations.

3. Implement Concrete Strategies and Composition

Create strategies for dynamic pricing, fees, discounts, etc. Use composition (e.g., decorators or pipelines) to combine them, enabling flexible per-ticket-type logic.

4. Integrate with a Strategy Resolver

Use a factory or registry to map ticket types to strategy instances, possibly configured via database or feature flags. This supports runtime changes without redeployment.

5. Address Cross-Cutting Concerns

Ensure strategies are stateless, thread-safe, and testable. Add logging, metrics, and fallback mechanisms. Consider caching and performance optimizations.

Key Points to Mention

  • Strategy pattern and dependency injection for pluggability
  • Composition of pricing rules (e.g., decorator pattern) to handle dynamic pricing, fees, and discounts
  • Configuration-driven strategy selection (e.g., database, feature flags) for runtime flexibility
  • Idempotency and auditability of pricing calculations
  • Performance considerations: caching, precomputation, and avoiding N+1 calls
  • Testing strategies: unit tests for each strategy, integration tests for composition

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

Q4

How do you handle concurrency when multiple users are trying to reserve the same seat at the same time?

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

Optimistic locking vs pessimistic locking.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and scale, then discuss concurrency control mechanisms such as optimistic vs. pessimistic locking, and finally propose a specific solution like database transactions with row-level locks or a distributed lock. Emphasize trade-offs between consistency, latency, and complexity, and how you would handle failures and retries.

Pro tip: Demonstrate awareness of real-world constraints by mentioning that the best solution depends on the read/write ratio and contention level, and that you would start with a simple database transaction and only add complexity if needed. Also, highlight the importance of idempotency and handling edge cases like payment failures.

1. Clarify Requirements

Ask about scale (e.g., number of concurrent users, seats per event), consistency requirements (e.g., is overbooking acceptable?), and latency expectations. This shows you don't jump to solutions without understanding the problem.

2. Identify Concurrency Issues

Explain the race condition: two users check availability, both see the seat as free, and both try to reserve it. Discuss the need for atomicity and isolation to prevent double-booking.

3. Evaluate Concurrency Control Options

Compare optimistic locking (version numbers, retry on conflict) vs. pessimistic locking (SELECT FOR UPDATE, distributed locks). Mention database transactions, isolation levels, and their trade-offs in terms of throughput and complexity.

4. Propose a Solution

Recommend a specific approach, such as using a database transaction with row-level locking for a single database, or a distributed lock (e.g., Redis, ZooKeeper) for a distributed system. Explain how it ensures only one user succeeds.

5. Address Edge Cases and Scalability

Discuss handling failures (e.g., lock timeouts, retries), idempotency, and how the solution scales. Mention possible optimizations like queueing or partitioning by seat/event to reduce contention.

Key Points to Mention

  • Race condition and need for atomic operations
  • Optimistic vs. pessimistic locking trade-offs
  • Database transactions and isolation levels (e.g., serializable, repeatable read)
  • Distributed locking mechanisms (Redis, ZooKeeper) for multi-server setups
  • Idempotency and retry logic to handle failures
  • Scalability considerations: partitioning, queueing, and read/write separation

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

Q5

Walk through your persistence schema, how you'd handle transactions and rollbacks, and your error handling approach for this system.

Data ModelingSystem DesignTechnical Trade-offs
Author's notes

Drew out a few tables: events, seats, holds, orders, payments.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's requirements and access patterns to justify your schema choices, then walk through the data model, transaction boundaries, and error handling strategies. Emphasize trade-offs and how your design aligns with Amazon's principles like scalability, availability, and durability.

Pro tip: Tie your decisions back to Amazon's Leadership Principles, such as Customer Obsession and Ownership, by explaining how your schema and error handling directly impact customer experience and operational excellence.

1. Clarify Requirements and Access Patterns

Ask questions to understand the data volume, read/write ratios, consistency needs, and query patterns. This ensures your schema and transaction design are fit for purpose.

2. Present the Persistence Schema

Describe the data model (e.g., relational, NoSQL, or hybrid), including tables/collections, keys, indexes, and relationships. Explain how it supports the access patterns and scales.

3. Explain Transaction Management

Outline how you handle transactions, including isolation levels, atomicity, and concurrency control. Discuss how you define transaction boundaries to maintain data integrity.

4. Detail Rollback and Recovery Strategies

Describe how you implement rollbacks (e.g., using savepoints, compensating transactions, or idempotent operations) and how you recover from failures to ensure consistency.

5. Describe Error Handling Approach

Explain how you detect, log, and respond to errors (e.g., retries with backoff, circuit breakers, dead-letter queues). Emphasize monitoring and alerting for operational visibility.

Key Points to Mention

  • Choice of database technology (SQL vs. NoSQL) and its rationale based on access patterns and scalability requirements.
  • Transaction isolation levels and their impact on consistency and performance.
  • Use of idempotency keys to safely retry operations and avoid duplicate processing.
  • Rollback mechanisms such as savepoints, compensating transactions, or event sourcing.
  • Error handling patterns like exponential backoff, retries, and circuit breakers.
  • Monitoring, logging, and alerting for proactive error detection and resolution.

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

Q6

What REST or gRPC APIs would you expose for this system? Describe the core endpoints and your reasoning.

API & IntegrationsSystem Design
Author's notes

Went with REST for the client-facing stuff and floated gRPC for internal service-to-service calls.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's core entities and operations, then propose a resource-oriented REST API for external clients and a gRPC API for internal service-to-service communication. Justify each endpoint by mapping it to business capabilities, and discuss trade-offs like performance, versioning, and security.

Pro tip: At Amazon, always tie your API design to customer needs and operational excellence—mention how you'd use API Gateway, CloudFront, and IAM for REST, and ALB with gRPC for internal calls, while ensuring idempotency and pagination for scalability.

1. Clarify the system and requirements

Ask questions to understand the system's domain, scale, clients, and consistency needs. This ensures your API design aligns with actual use cases.

2. Identify core resources and operations

List the main entities (e.g., orders, users) and the CRUD operations or business actions needed. Group them into logical domains.

3. Design REST endpoints for external clients

Define resource-oriented URLs, HTTP methods, status codes, and payloads. Include pagination, filtering, and versioning strategies.

4. Design gRPC services for internal communication

Define protobuf services and RPC methods for high-performance, low-latency interactions between microservices. Highlight streaming if needed.

5. Justify choices and discuss trade-offs

Explain why REST for external and gRPC for internal, covering security, performance, evolvability, and operational concerns.

Key Points to Mention

  • Resource modeling and URI design following REST best practices (e.g., plural nouns, nesting).
  • HTTP methods and status codes (GET, POST, PUT, PATCH, DELETE; 200, 201, 400, 404, 500).
  • Pagination, filtering, and sorting for large collections (e.g., limit/offset or cursor-based).
  • API versioning strategies (e.g., URI versioning, custom headers) and backward compatibility.
  • gRPC benefits: HTTP/2, protobuf, streaming, and code generation for polyglot services.
  • Security: authentication (OAuth2, JWT), authorization (IAM policies), and encryption (TLS).
  • Idempotency and retry semantics for critical operations (e.g., using idempotency keys).

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

Q7

How would you test this system, and how would you evolve it as new ticket types and pricing policies are introduced over time?

Technical Trade-offsAdaptability & AmbiguitySystem Design
Author's notes

Unit tests on the pricing strategies and factory registration in isolation, integration tests hitting a real database for the hold and purchase flows.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system's core components and current ticket/pricing model, then outline a layered testing strategy covering unit, integration, and end-to-end tests. For evolution, emphasize designing for extensibility using patterns like strategy or rules engines, and describe how you'd use feature flags, canary releases, and automated regression tests to safely introduce new ticket types and pricing policies.

Pro tip: Tie your testing and evolution strategy to Amazon's leadership principles, especially 'Customer Obsession' and 'Invent and Simplify'—show how your approach reduces risk while enabling rapid iteration. Also, mention concrete examples of how you've handled similar changes in past projects to demonstrate practical experience.

1. Clarify Requirements and System Context

Ask clarifying questions about the system's architecture, current ticket types, pricing rules, and non-functional requirements like scalability and consistency. This ensures your answer is tailored and shows you think before coding.

2. Design a Comprehensive Testing Strategy

Propose a test pyramid: unit tests for pricing calculations and ticket validation, integration tests for service interactions, and end-to-end tests for user journeys. Include edge cases like invalid tickets, concurrent purchases, and pricing boundary conditions.

3. Plan for Evolution with Extensible Design

Advocate for modular design using patterns like Strategy, Factory, or Rules Engine to encapsulate ticket types and pricing policies. This allows adding new types without modifying existing code, adhering to Open/Closed Principle.

4. Implement Safe Deployment and Monitoring

Describe using feature flags, canary deployments, and A/B testing to roll out changes gradually. Emphasize monitoring key metrics (e.g., error rates, latency, conversion) and having rollback plans.

5. Automate and Iterate

Highlight the importance of CI/CD pipelines to run regression tests automatically. Suggest maintaining a living documentation of pricing policies and using contract tests to ensure compatibility as the system evolves.

Key Points to Mention

  • Test pyramid: unit, integration, end-to-end tests with focus on pricing logic and ticket validation.
  • Design patterns for extensibility: Strategy, Factory, Rules Engine, or Domain-Driven Design.
  • Feature flags and canary releases for safe, incremental rollouts.
  • Automated regression testing and contract testing to prevent breaking changes.
  • Monitoring and observability: metrics, logging, and alerting for pricing anomalies.
  • Amazon Leadership Principles: Customer Obsession, Invent and Simplify, Bias for Action.

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