Design a file-storage service with reliable uploads and retrieval
Company: Amazon
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Onsite
Design a file-storage service. Describe how clients upload, retrieve, and manage stored files, how metadata relates to file bytes, and how the service handles interrupted operations and access control.
```hint Track bytes and metadata separately
Consider an upload that writes bytes successfully but loses its final metadata update. Explain how readers and cleanup jobs distinguish complete files from abandoned data.
```
### Clarifying Questions
- Is this a personal file store, shared team storage, or an application-facing object API?
- Which operations are required: listing, folders, sharing, version history, or device synchronization?
- What file-size distribution, request rate, durability requirement, and access latency should the design support?
- Should concurrent updates create versions, reject conflicts, or overwrite existing content?
### What a Strong Answer Covers
- File identity, metadata, byte storage, and the requested API semantics
- Upload completion, download authorization, and interrupted transfers
- Consistency around overwrite, deletion, and concurrent updates
- Durability, recovery, storage costs, and operational checks
### Follow-up Questions
- How would a large upload resume after a network interruption?
- How would you handle an already-issued download URL that is still valid when the file’s permissions change?
- How would you reconcile metadata that references missing objects and objects without metadata?
Overview: Design a file-storage service with reliable uploads, authorized downloads, and consistent metadata. Work through interrupted transfers, concurrent updates, deletion, object cleanup, and durability trade-offs.
Read the full Amazon Software Engineer interview experience this question came from