← Amazon Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

System design round at Amazon for a software engineer role, full hour spent on designing a cloud document storage and sharing service from scratch. The scope was massive and I kept second-guessing how deep to go on each subsystem.

Questions Asked (8)

Q1

Design a cloud document storage and sharing service similar to Google Drive, covering the full stack: upload/download flows, folder hierarchy, metadata and search, sharing and access controls, versioning, and trash/restore.

System DesignData ModelingTechnical Trade-offs
Author's notes

I started with requirements which felt right, but I burned maybe 15 minutes just on scoping and the interviewer had to nudge me toward the actual architecture.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then estimate scale (users, files, storage). Design the high-level architecture with core components (API gateway, metadata service, blob storage, search, sharing service), then dive into data models and key flows like upload/download, sharing, versioning, and trash.

Pro tip: Emphasize trade-offs, especially around consistency vs. availability for sharing and metadata, and how you'd handle large file uploads with chunking and resumability. Also, mention how you'd leverage AWS services like S3, DynamoDB, and Elasticsearch to simplify the design.

1. Requirements and Scale

Clarify functional requirements (upload/download, folders, sharing, search, versioning, trash) and non-functional (availability, durability, consistency, latency). Estimate scale: number of users, files per user, average file size, read/write ratio.

2. High-Level Architecture

Outline main components: API gateway, metadata service (SQL/NoSQL), blob storage (S3), search service (Elasticsearch), sharing/access control service, versioning service, trash service. Describe how they interact.

3. Data Modeling

Design schemas for users, files, folders, permissions, versions, and trash. Consider hierarchical folder structure using parent pointers or materialized paths. Decide on SQL vs NoSQL for metadata based on query patterns.

4. Core Flows

Detail upload/download (chunking, resumability, deduplication), sharing (link sharing, user/group permissions, access control lists), search (indexing metadata and content), versioning (storing multiple versions, retrieval), and trash/restore (soft delete, retention policy).

5. Trade-offs and Scalability

Discuss trade-offs: consistency vs. availability for sharing, latency vs. durability for uploads, cost vs. performance for storage tiers. Explain how to scale each component (sharding, caching, CDN) and handle failures.

Key Points to Mention

  • Use of object storage (e.g., S3) for file blobs with metadata in a database; consider chunking and deduplication for large files.
  • Access control models: ACLs, role-based access, and sharing links with expiration; consistency implications for permission changes.
  • Versioning: store multiple versions efficiently, possibly using copy-on-write or delta encoding; retrieval by version ID.
  • Search: index metadata and extracted text (if needed) using a search engine like Elasticsearch; support filters and sorting.
  • Trash/restore: soft delete with a retention period, background cleanup, and restore functionality.
  • Scalability and reliability: sharding metadata, caching hot data, using CDN for downloads, and ensuring durability via replication.

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 storage architecture, including the object store, metadata store, and indexing layer?

System DesignTechnical Trade-offs
Author's notes

Talked through separating blob storage from metadata, which they seemed fine with.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, access patterns, consistency, durability) and then propose a layered architecture: object store for blobs, metadata store for structured attributes, and indexing layer for efficient lookups. Discuss trade-offs between consistency, latency, and cost, and justify choices with Amazon-scale considerations like S3, DynamoDB, and Elasticsearch.

Pro tip: Emphasize decoupling and eventual consistency where possible, and mention how you would handle failures and scale each layer independently—this shows you think about real-world operations, not just ideal designs.

1. Clarify Requirements

Ask about data size, access patterns (read/write ratio, query types), consistency needs, durability, and budget. This ensures your design targets the right trade-offs.

2. Design Object Store

Propose a scalable, durable object store like Amazon S3 for storing large blobs (images, videos, documents). Discuss partitioning, replication, and lifecycle policies.

3. Design Metadata Store

Choose a database for structured metadata (e.g., DynamoDB for key-value access or Aurora for relational). Discuss schema, indexing, and consistency models.

4. Design Indexing Layer

Implement a search/indexing service (e.g., Elasticsearch or a custom inverted index) to enable efficient queries on metadata. Discuss how to keep it in sync with the metadata store.

5. Address Trade-offs and Scale

Explain how each layer scales independently, handles failures, and maintains consistency. Discuss cost, latency, and operational complexity trade-offs.

Key Points to Mention

  • Use of Amazon S3 for object storage with durability and scalability.
  • DynamoDB for metadata with adaptive capacity and global tables for multi-region.
  • Elasticsearch or OpenSearch for full-text search and complex queries.
  • Event-driven synchronization (e.g., S3 events to Lambda to update metadata/index).
  • Trade-offs: strong vs. eventual consistency, cost of indexing, and read/write latency.
  • Partitioning and sharding strategies to handle scale and hot keys.

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

Q3

Walk me through how you'd handle upload chunking and resumability for large files.

System DesignAPI & Integrations
Author's notes

This was actually the part I felt best about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (file size, concurrency, client types) and then outline a chunked upload protocol with resumability. Describe the client-server interaction, storage design, and failure handling, emphasizing idempotency and scalability.

Pro tip: Mention how you'd leverage S3 multipart upload with pre-signed URLs to offload chunk handling and enable resumability without burdening your servers. Also highlight the importance of tracking upload state and cleaning up incomplete uploads to avoid storage leaks.

1. Clarify Requirements and Constraints

Ask about file sizes, network conditions, client types, and concurrency needs. Determine if the solution should be server-centric or leverage cloud storage services.

2. Design Chunking Strategy

Define chunk size (e.g., 5-10 MB), how to split files, and how to assign unique identifiers to each chunk and the overall upload session.

3. Implement Resumable Upload Protocol

Outline the API endpoints for initiating upload, uploading chunks (with retries), checking status, and completing the upload. Ensure idempotency and track progress server-side.

4. Handle Failures and Concurrency

Describe retry logic with exponential backoff, handling duplicate chunks, and supporting parallel chunk uploads. Discuss how to resume from the last successful chunk.

5. Address Storage, Cleanup, and Scalability

Explain how chunks are stored (e.g., S3 multipart), how to assemble them, and how to clean up incomplete uploads. Consider scalability and cost implications.

Key Points to Mention

  • Chunk size selection and trade-offs (network overhead vs. memory)
  • Unique upload session ID and chunk sequence numbers
  • Idempotent chunk uploads to handle retries safely
  • Server-side tracking of received chunks (e.g., via database or S3 metadata)
  • Use of pre-signed URLs for direct client-to-S3 uploads
  • Cleanup of incomplete uploads and lifecycle policies

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

Q4

How would you approach encryption at rest and in transit for stored documents?

System DesignTechnical Trade-offs
Author's notes

Pretty standard answer: TLS for transit, envelope encryption for at-rest where each file gets its own data key and the data key is encrypted with a master key.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, then propose a layered encryption strategy covering data at rest and in transit, and discuss trade-offs like performance, key management, and compliance. Emphasize AWS services and best practices, and conclude with monitoring and rotation policies.

Pro tip: Demonstrate awareness of Amazon's leadership principles by highlighting customer trust and security as top priorities, and mention specific AWS services like KMS, ACM, and S3 encryption options to show practical knowledge.

1. Clarify Requirements

Ask about data sensitivity, compliance needs (e.g., HIPAA, GDPR), performance requirements, and existing infrastructure to tailor the solution.

2. Encryption at Rest

Propose using AWS KMS for key management, S3 SSE (SSE-S3, SSE-KMS, SSE-C) or EBS encryption for storage, and client-side encryption for additional control.

3. Encryption in Transit

Recommend TLS/SSL for all data in transit, using ACM for certificate management, and enforcing HTTPS with security groups and VPC endpoints.

4. Key Management and Rotation

Discuss key rotation policies, separation of duties, and using AWS KMS customer managed keys for granular control and auditability.

5. Monitoring and Compliance

Mention logging with CloudTrail, monitoring with CloudWatch, and regular audits to ensure encryption policies are enforced and compliant.

Key Points to Mention

  • AWS KMS for centralized key management and envelope encryption
  • S3 server-side encryption options (SSE-S3, SSE-KMS, SSE-C) and client-side encryption
  • TLS 1.2+ for data in transit, using ACM for certificate provisioning and renewal
  • Key rotation and access policies to minimize risk
  • Performance and cost trade-offs of encryption (e.g., latency, KMS API costs)
  • Compliance standards (e.g., PCI DSS, HIPAA) and auditing with CloudTrail

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

Q5

Describe how you'd implement virus scanning and thumbnail generation as part of the file processing pipeline.

System DesignTechnical Trade-offs
Author's notes

Framed it as an async pipeline triggered after upload.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (file types, sizes, latency, security) and then design an asynchronous, event-driven pipeline using AWS services like S3, SQS, and Lambda. Explain how virus scanning and thumbnail generation can run in parallel or sequentially, with trade-offs around cost, latency, and reliability.

Pro tip: Emphasize idempotency and dead-letter queues to handle failures gracefully, and mention how you'd monitor and alert on scanning failures or thumbnail generation errors—this shows operational maturity that Amazon values.

1. Clarify Requirements

Ask about file types, size limits, expected throughput, latency requirements, and security/compliance needs. This ensures your design addresses the right constraints.

2. Design the Pipeline Architecture

Propose an event-driven pipeline: file upload triggers an event, which enqueues a message. Use separate queues or topics for virus scanning and thumbnail generation to decouple processing.

3. Implement Virus Scanning

Use a scanning service (e.g., ClamAV on EC2/ECS, or a managed service) triggered by the queue. Scan the file, and on success, proceed; on failure, quarantine the file and notify.

4. Implement Thumbnail Generation

For image/video files, use a library like ImageMagick or FFmpeg in a Lambda or container. Generate thumbnails and store them in a separate S3 bucket or prefix.

5. Handle Failures and Scale

Use dead-letter queues for failed scans or thumbnail jobs, implement retries with backoff, and auto-scale based on queue depth. Monitor with CloudWatch and set alarms.

Key Points to Mention

  • Asynchronous processing to avoid blocking uploads and improve user experience
  • Use of AWS services: S3, SQS, Lambda, Step Functions, or Fargate for orchestration
  • Idempotency to handle duplicate messages and ensure exactly-once processing
  • Security: quarantine infected files, encrypt data at rest and in transit
  • Cost and performance trade-offs: Lambda vs. EC2, parallel vs. sequential processing
  • Monitoring and alerting: CloudWatch metrics, logs, and alarms for failures

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

Q6

How would you partition and replicate data to ensure scalability and high availability?

System DesignTechnical Trade-offs
Author's notes

Talked through sharding metadata by user ID, replicating blobs across availability zones.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements like read/write ratio, consistency needs, and scale. Then propose a partitioning strategy (e.g., hash-based) and a replication strategy (e.g., leader-follower with quorum) that together meet scalability and high availability. Discuss trade-offs and how you'd handle rebalancing, failover, and consistency.

Pro tip: Tie your choices to Amazon's leadership principles and services (e.g., DynamoDB, S3) to show customer obsession and ownership. Mention real-world failure scenarios and how your design mitigates them.

1. Clarify Requirements

Ask about data volume, read/write patterns, latency, consistency, and availability targets to scope the problem.

2. Choose Partitioning Strategy

Select a partitioning key and method (e.g., hash, range) to distribute data evenly and avoid hotspots.

3. Design Replication

Decide on replication topology (e.g., leader-follower, multi-leader) and consistency model (e.g., quorum) to ensure durability and availability.

4. Address Failover and Rebalancing

Explain how the system detects failures, promotes replicas, and rebalances partitions when nodes are added or removed.

5. Discuss Trade-offs

Compare consistency vs. availability, latency vs. durability, and cost implications of your design choices.

Key Points to Mention

  • Consistent hashing for even distribution and minimal rebalancing
  • Quorum-based replication (e.g., R+W > N) for tunable consistency
  • Leader election and failover mechanisms (e.g., using Raft or Paxos)
  • Handling hotspots and skew via composite keys or salting
  • Multi-AZ or multi-region replication for disaster recovery
  • Monitoring and auto-scaling to maintain performance under load

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

Q7

How would you enforce permission checks efficiently at scale, and where in the request path do they live?

System DesignAPI & Integrations
Author's notes

Said permission checks should happen at the API gateway layer before any storage call.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale and requirements, then propose a layered architecture with permission checks at multiple points: coarse-grained at the edge, fine-grained at the service, and data-level filtering. Emphasize caching, policy evaluation optimizations, and trade-offs between latency, consistency, and complexity.

Pro tip: At Amazon, always tie your answer back to customer impact and operational excellence—mention how you'd measure permission check latency and set up alarms for authorization failures.

1. Clarify Requirements and Scale

Ask about the number of users, resources, request rate, latency SLAs, and consistency requirements. This shapes the entire design.

2. Define Permission Model

Choose a model like RBAC, ABAC, or ReBAC, and decide how policies are stored and versioned. Consider using a centralized policy decision point (PDP).

3. Place Checks in Request Path

Enforce coarse-grained checks at the API gateway (e.g., authentication, rate limiting) and fine-grained checks at the service layer (e.g., resource-level permissions). Optionally, push filters to the data layer for row-level security.

4. Optimize for Scale

Cache policy decisions with short TTLs, use efficient policy evaluation (e.g., compiled policies), and consider asynchronous checks for non-critical paths. Shard policy data if needed.

5. Ensure Observability and Consistency

Instrument permission checks with metrics and logs, and handle cache invalidation and policy updates gracefully. Discuss trade-offs between consistency and latency.

Key Points to Mention

  • Centralized policy decision point (PDP) with local caching to reduce latency
  • Coarse-grained vs. fine-grained authorization and where each belongs
  • Caching strategies (TTL, invalidation) and their impact on consistency
  • Use of JWT claims for stateless checks at the edge
  • Data-level filtering (e.g., row-level security) to avoid leaking unauthorized data
  • Trade-offs: latency vs. consistency, complexity vs. maintainability

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

Q8

What are your capacity estimates for a service at this scale, and what are the main cost drivers?

System DesignTechnical Trade-offs
Author's notes

Did some rough math on storage, bandwidth, and metadata ops.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scale (e.g., requests per second, data volume) and then walk through a structured capacity estimation: break down traffic, compute resource needs (compute, storage, network), and identify primary cost drivers. Emphasize trade-offs and how design choices impact both capacity and cost.

Pro tip: Tie your estimates to concrete AWS services and pricing models (e.g., EC2, S3, DynamoDB) and mention cost optimization strategies like auto-scaling, reserved instances, or spot instances to show business awareness.

1. Clarify Scale and Assumptions

Ask clarifying questions about user base, request rate, data size, and growth projections to establish a baseline for calculations.

2. Estimate Traffic and Resource Needs

Calculate peak QPS, storage requirements, and network bandwidth, then derive the number of servers, database capacity, and caching layers needed.

3. Identify Cost Drivers

Break down costs into compute, storage, network, and managed services, highlighting which components dominate the bill.

4. Discuss Trade-offs and Optimizations

Explain how design decisions (e.g., instance types, data retention, CDN usage) affect capacity and cost, and propose optimizations.

Key Points to Mention

  • Back-of-the-envelope calculations for QPS, storage, and bandwidth
  • AWS service choices (EC2, S3, DynamoDB, Lambda) and their pricing models
  • Cost drivers: compute instances, data transfer, storage, and database throughput
  • Auto-scaling and elasticity to match demand and reduce over-provisioning
  • Reserved instances, spot instances, and savings plans for cost reduction
  • Monitoring and right-sizing based on utilization metrics

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