← Amazon Interview Insights

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

SeniorPrefer not to say
Jun 2026

Summary

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

Questions Asked (5)

Q1

Design a file-sharing permission control system where users can share files with each other, a homepage lists all files a user can access, and you can check whether a specific user has access to a specific file.

System DesignTechnical Trade-offsData Modeling
Author's notes

I started with a basic ACL table, which was fine, but the interviewer kept pulling the thread.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, including scale, consistency, and latency needs. Then design a data model that supports efficient access checks and homepage listing, likely using a graph or relational model with indexing. Finally, discuss trade-offs between different approaches and how to handle scale, caching, and consistency.

Pro tip: Emphasize the importance of defining clear access control semantics (e.g., ownership, group sharing, inheritance) early, as this drives the data model and query patterns. Also, mention how you would handle permission revocation and propagation to ensure correctness at scale.

1. Clarify Requirements

Ask questions to understand scale (number of users, files, shares), access patterns (read/write ratio, frequency of permission checks), consistency requirements (strong vs eventual), and security constraints.

2. Design Data Model

Propose a schema to represent users, files, and permissions. Consider using a relational model with a permissions table (user_id, file_id, role) or a graph model for complex sharing relationships. Discuss indexing for fast lookups.

3. Define Access Control Logic

Outline how to check if a user has access to a file, including direct ownership, explicit shares, group memberships, and inherited permissions. Consider using an access control list (ACL) or role-based access control (RBAC).

4. Implement Homepage Listing

Design a query to efficiently retrieve all files a user can access. Discuss strategies like denormalization, caching, or using a search index to avoid expensive joins at scale.

5. Address Scalability and Trade-offs

Discuss how to scale the system (sharding, replication), handle consistency (e.g., eventual consistency for permission updates), and trade-offs between simplicity and performance (e.g., precomputed access lists vs on-the-fly checks).

Key Points to Mention

  • Data model choices: relational vs graph, and indexing strategies for fast permission checks.
  • Access control models: ACL, RBAC, or a combination, and how to handle inheritance and group sharing.
  • Caching strategies: caching permission checks and homepage listings to reduce latency and database load.
  • Consistency trade-offs: strong vs eventual consistency for permission updates and their impact on user experience.
  • Scalability considerations: sharding by user or file, replication, and handling hot spots.
  • Security and audit: ensuring permissions are enforced correctly, logging access, and handling revocation.

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

Q2

How would you handle consistency after a user's access is revoked? What's the acceptable staleness window and how do you enforce it?

System DesignTechnical Trade-offs
Author's notes

Waved at 'eventual consistency' too early and the interviewer pushed back immediately.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the system context and the business impact of stale access, then propose a layered approach combining push-based revocation with periodic validation. Define an acceptable staleness window based on risk tolerance and enforce it through caching TTLs, token expiry, and revocation propagation mechanisms.

Pro tip: Tie the staleness window to the sensitivity of the resource and the cost of false positives—e.g., for high-risk actions, enforce zero staleness with synchronous checks, while low-risk reads can tolerate minutes. This shows you balance security with availability and performance.

1. Clarify requirements and risk

Ask about the system's scale, the sensitivity of resources, and the business impact of stale access. Determine whether the revocation is for a single session, a user, or a role, and identify the acceptable risk window.

2. Design revocation propagation

Propose a mechanism to propagate revocation events, such as a pub/sub system or a centralized revocation list. Ensure it is reliable and low-latency, with fallbacks like periodic polling.

3. Enforce staleness bounds

Use short-lived tokens or cached permissions with TTLs that match the acceptable staleness window. For stricter requirements, implement synchronous checks or versioning to invalidate caches immediately.

4. Handle edge cases and failures

Address scenarios like network partitions, service outages, and clock skew. Consider graceful degradation, such as denying access when the revocation status cannot be verified.

5. Monitor and iterate

Define metrics to track revocation latency and staleness, and set up alerts. Continuously review and adjust the window based on observed incidents and performance.

Key Points to Mention

  • Trade-off between security and availability: shorter staleness improves security but may increase latency and load.
  • Use of short-lived tokens (e.g., JWT with short expiry) and refresh tokens with revocation checks.
  • Centralized revocation list or distributed cache with pub/sub for invalidation (e.g., Redis pub/sub, Kafka).
  • Versioning of permissions or user sessions to enable immediate invalidation without full cache flush.
  • Fallback mechanisms: if revocation check fails, default to deny (fail-safe) for sensitive operations.
  • Monitoring and alerting on revocation propagation delay and cache hit ratios to ensure compliance.

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

Q3

How does your design handle files shared with large groups, say a group with tens of thousands of members?

System DesignTechnical Trade-offs
Author's notes

This one caught me mid-sentence.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and scale, then propose a design that separates metadata from content and uses a fan-out-on-write or fan-out-on-read strategy for sharing. Discuss trade-offs between consistency, latency, and cost, and explain how you would handle permissions and access control at scale.

Pro tip: Demonstrate awareness of Amazon's leadership principles by emphasizing customer obsession (fast access for all group members) and ownership (end-to-end design including monitoring and failure handling). Also, mention real-world constraints like S3 request limits and how to mitigate them.

1. Clarify Requirements and Scale

Ask questions to understand the expected read/write ratio, latency requirements, consistency needs, and group membership dynamics (e.g., how often members change).

2. High-Level Design

Propose a system that stores file content in a scalable object store (e.g., S3) and metadata in a database. For sharing, consider a permission model where group membership is checked at access time or precomputed.

3. Address the Large Group Challenge

Discuss fan-out strategies: for read-heavy workloads, use fan-out-on-read with a centralized permission service; for write-heavy, consider fan-out-on-write but beware of write amplification. Alternatively, use a hybrid approach.

4. Handle Permissions and Access Control

Explain how to efficiently check if a user belongs to a group with tens of thousands of members. Options include caching group memberships, using a graph database, or leveraging an existing identity service.

5. Discuss Trade-offs and Optimizations

Compare latency, consistency, cost, and complexity of different approaches. Mention optimizations like CDN for content delivery, pre-signed URLs, and asynchronous permission updates.

Key Points to Mention

  • Separation of file content (object store) and metadata (database) for scalability.
  • Fan-out-on-read vs. fan-out-on-write for sharing with large groups, and when to use each.
  • Efficient permission checking: caching, precomputed access lists, or using a dedicated authorization service.
  • Handling group membership changes and ensuring consistency (e.g., eventual consistency vs. strong consistency).
  • Scalability limits of underlying services (e.g., S3 request rates) and mitigation strategies like request partitioning.
  • Cost implications of storing multiple copies vs. single copy with access control.

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

Q4

What changes if your permission model supports explicit deny rules in addition to allow rules?

System DesignAlgorithms & Data Structures
Author's notes

Short answer: everything gets harder.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by explaining how explicit deny rules change the evaluation semantics from a simple union of allows to a deny-overrides model, then discuss the implications for policy evaluation, conflict resolution, and system design. Use concrete examples to illustrate how deny rules affect authorization decisions, performance, and maintainability.

Pro tip: Emphasize that explicit deny rules enable least privilege and defense in depth, but they also introduce complexity in policy management and debugging; show you understand the trade-offs by mentioning how to audit and test deny rules effectively.

1. Define the change in semantics

Explain that with explicit deny, the evaluation logic must check for denies first; if any deny matches, access is denied regardless of allows. This is often called 'deny overrides'.

2. Discuss conflict resolution

Describe how to handle conflicts when both allow and deny rules apply. Typically, deny takes precedence, but you should mention the need for a clear precedence order (e.g., explicit deny > explicit allow > implicit deny).

3. Analyze impact on policy evaluation

Consider how deny rules affect the evaluation algorithm: you may need to evaluate all policies (or short-circuit on deny) and ensure that denies are checked efficiently, possibly with indexing or caching.

4. Address system design implications

Discuss how deny rules affect policy storage, versioning, and propagation. For example, you might need to support negative permissions in your data model and ensure consistency across distributed systems.

5. Highlight operational considerations

Mention the need for auditing, testing, and debugging tools to understand why access was denied. Also, discuss how deny rules can help meet compliance requirements like least privilege.

Key Points to Mention

  • Deny-overrides evaluation strategy and its precedence over allow rules
  • Implications for policy language design (e.g., adding 'deny' statements)
  • Performance considerations: short-circuiting, caching, and indexing deny rules
  • Security benefits: least privilege, defense in depth, and explicit revocation
  • Complexity challenges: policy conflicts, debugging, and auditing
  • Real-world examples: AWS IAM policies with explicit deny, or similar systems

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

Q5

Walk me through how you'd extend the design to support folder-level permissions that inherit down to files.

System DesignData Modeling
Author's notes

I described recursive expansion with a depth cap to avoid cycles.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the current design and requirements, then propose a hierarchical permission model that stores permissions at the folder level and resolves effective permissions by traversing the folder ancestry. Discuss trade-offs between inheritance, overrides, and performance, and outline how to handle edge cases like moves and deletes.

Pro tip: Mention that you would cache effective permissions at the file level with invalidation on folder permission changes to balance read performance and consistency, and discuss how to handle permission propagation asynchronously for large trees.

1. Clarify requirements and constraints

Ask about the scale (number of folders/files, depth of hierarchy), consistency requirements, and whether permissions can be overridden at lower levels.

2. Design the data model

Propose a schema with a folders table (id, parent_id) and a permissions table (resource_id, resource_type, principal, permission). Explain how to represent inheritance, e.g., by storing permissions only at the folder level and resolving at read time.

3. Define permission resolution logic

Describe how to compute effective permissions for a file: walk up the folder hierarchy, collect permissions, and apply precedence rules (e.g., explicit deny overrides allow, closest ancestor wins).

4. Address performance and scalability

Discuss caching effective permissions, using materialized paths or closure tables for efficient ancestor queries, and handling permission changes with asynchronous propagation.

5. Handle edge cases and operations

Cover moving folders/files, deleting folders, and bulk permission updates. Explain how to maintain consistency and avoid orphaned permissions.

Key Points to Mention

  • Hierarchical data modeling (adjacency list, materialized path, closure table)
  • Permission inheritance and override precedence (allow vs deny, closest ancestor)
  • Effective permission computation and caching strategies
  • Consistency trade-offs (strong vs eventual) and asynchronous propagation
  • Edge cases: moving, deleting, and bulk updates
  • Scalability considerations: indexing, query optimization, and sharding

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