← Amazon Interview Insights

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

Senior
May 2026

Summary

Amazon system design round focused entirely on a file permission and sharing system. Pretty deep dive, they kept pushing on edge cases I hadn't fully thought through.

Questions Asked (3)

Q1

Design a file sharing and permissions system where users can share files with individuals or groups, a home page lists all accessible files, and access is checked on every file request.

System DesignData ModelingTechnical Trade-offs
Author's notes

I started with the data model which felt right, users, groups, files, and some kind of ACL table linking them.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then design a data model that represents users, groups, files, and permissions efficiently. Propose an architecture that supports fast access checks on every request, and discuss trade-offs between different approaches for permission evaluation and home page listing.

Pro tip: Emphasize the importance of caching and indexing for permission checks to meet low-latency requirements, and discuss how to handle permission changes without invalidating caches aggressively. Also, consider mentioning Amazon's leadership principles like 'Customer Obsession' and 'Dive Deep' to align with the company culture.

1. Clarify Requirements

Ask questions to understand scale, latency requirements, consistency needs, and whether permissions are hierarchical or flat. Clarify if groups can be nested and if permissions can be inherited.

2. Design Data Model

Define entities: User, Group, File, Permission. Choose a schema that supports efficient queries for access checks and listing accessible files, such as a relational model with indexes or a graph model for complex relationships.

3. Design Access Control Mechanism

Propose an authorization service that checks permissions on every request. Discuss approaches like ACLs, RBAC, or ABAC, and how to evaluate permissions quickly, possibly using precomputed effective permissions or caching.

4. Design Home Page Listing

Explain how to efficiently retrieve all files a user can access. Consider denormalization, materialized views, or a separate index that maps users to accessible files, and discuss trade-offs with consistency.

5. Address Scalability and Trade-offs

Discuss how the system scales with millions of users and files, including sharding, caching strategies, and consistency vs. latency trade-offs. Mention monitoring and handling permission changes.

Key Points to Mention

  • Use of caching (e.g., Redis) for permission checks to reduce latency and database load.
  • Indexing strategies for fast lookup of permissions and file listings.
  • Handling nested groups and permission inheritance efficiently.
  • Trade-offs between strong consistency and eventual consistency for permission updates.
  • Sharding and partitioning strategies for scalability.
  • Security considerations such as auditing and revocation of access.

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

Q2

How would you handle group hierarchies, where groups can contain other groups, in the context of permission checks and index maintenance?

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

Honestly did not see this coming as a follow-up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and constraints, such as read/write ratio, depth of nesting, and consistency needs. Then propose a data model (e.g., closure table or materialized path) and explain how permission checks and index maintenance work with that model, discussing trade-offs and optimizations.

Pro tip: Mention that you would consider caching effective permissions and using incremental updates to indexes to avoid expensive recursive queries on every check, especially at Amazon scale.

1. Clarify Requirements

Ask about expected read/write patterns, maximum depth, consistency requirements, and scale to guide design choices.

2. Choose Data Model

Select a representation for group hierarchies, such as closure table, materialized path, or nested sets, and justify based on requirements.

3. Design Permission Checks

Explain how to efficiently determine if a user has a permission via group membership, considering inheritance and possible caching.

4. Plan Index Maintenance

Describe how to update indexes when groups or memberships change, ensuring consistency and performance.

5. Discuss Trade-offs and Optimizations

Compare alternatives, mention caching, batch updates, and how to handle deep hierarchies or frequent changes.

Key Points to Mention

  • Closure table pattern for efficient ancestor/descendant queries
  • Materialized path or nested sets as alternatives with different trade-offs
  • Caching effective permissions to reduce recursive lookups
  • Incremental index updates vs. full rebuilds on hierarchy changes
  • Handling cycles and ensuring acyclic group hierarchies
  • Scalability considerations for deep hierarchies and high read/write loads

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

Q3

What consistency guarantees do you need between a sharing action and subsequent authorization checks, and how would you approach that?

System DesignTechnical Trade-offs
Author's notes

This one I actually had a reasonable answer for.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the scenario: a user shares a resource (e.g., a document) and then an authorization check occurs. Discuss the consistency requirements between the share action and the check, considering factors like read-after-write consistency, eventual consistency, and the impact of stale reads. Then propose a design that balances consistency, availability, and latency, such as using a strongly consistent store for permissions or a write-through cache with versioning.

Pro tip: Amazon values customer trust and security, so emphasize that authorization decisions must never be based on stale data. Mention that you would default to strong consistency for permission checks, but discuss how to mitigate performance impacts with techniques like caching with short TTLs and invalidation on writes.

1. Clarify requirements and constraints

Ask questions to understand the use case: Is the share action user-initiated? What is the expected latency? What are the consequences of a stale authorization check? This helps determine the necessary consistency level.

2. Define consistency guarantees

Explain that the share action must be immediately visible to subsequent authorization checks (read-after-write consistency). Discuss trade-offs between strong consistency (e.g., linearizability) and eventual consistency, and why strong consistency is often required for security-sensitive operations.

3. Propose a technical approach

Suggest using a strongly consistent data store (e.g., DynamoDB with strong read consistency, or a relational database with transactions) for storing permissions. Alternatively, use a write-through cache with versioning and invalidation to ensure checks see the latest state.

4. Address scalability and performance

Discuss how to handle high read volumes: caching with short TTLs, read replicas with synchronous replication, or a distributed cache with strong consistency (e.g., Redis with WAIT command). Mention monitoring and fallback strategies.

5. Consider failure modes and edge cases

Talk about what happens if the consistency mechanism fails (e.g., cache invalidation fails). Propose safeguards like fail-closed authorization, audit logging, and reconciliation processes.

Key Points to Mention

  • Read-after-write consistency for permission changes
  • Strong consistency vs. eventual consistency trade-offs
  • Use of transactions or atomic operations for share actions
  • Cache invalidation strategies and TTLs
  • Impact on latency and availability (CAP theorem)
  • Security implications of stale authorization data

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