AI & Technical question
Design a file download API. A client will send the URL of the file they want to download.
- Amazon
- AI & Technical
- Medium
Practice this question out loud. An AI interviewer asks it, follows up like a real interviewer would, and scores your answer. Type or speak.
Start a mock interview on this question · Mock interview from a job description
What this question tests
Tests technical system design fundamentals: API contract, handling large files, and reliability under failure.
How to approach it
- Clarify requirements: file size range, whether resumable downloads matter, expected concurrency.
- Define the API contract: an endpoint accepting a file URL, returning a job ID or a redirect and stream.
- Decide sync versus async: for large files, return a job ID immediately, let the client poll or use a webhook.
- Address reliability: support range requests so downloads resume after a dropped connection, validate via checksum.
- Address security: validate the source URL against an allowlist or scan before serving it back.
- Define quality measurement: download success rate, average latency, resumption success rate.
What a strong answer includes
- Chooses an async, job-based design for large files instead of a blocking synchronous call.
- Explicitly adds resumability via range requests, since that's the whole point of large-file downloads.
- Adds a security check on the source URL, showing awareness of SSRF-style risk.
Common mistakes
- Designing only the happy path with no handling for interrupted or large downloads.
- Ignoring security validation of an arbitrary client-supplied URL.
Likely follow-up questions
- How would you handle a URL pointing to a very large or malicious file?
- How would you scale this for millions of concurrent downloads?
- How would you notify the client when the download is ready?
More ai & technical questions
- Design a simple load balancer for Google.com. What data structures would you use?Google · AI & Technical · Hard
- How would you design a system that allocates package delivery orders to drivers and maximizes fufillment during busy and non busy hoursAmazon · AI & Technical · Hard
- How does product recommendation work on Amazon?Amazon · AI & Technical · Hard
- Build the payment API for a charity event.DoorDash · AI & Technical · Medium
- The Chrome team is looking to reduce power utilization on mobile phones when using the browser. How would you go about solving this problem?Google · AI & Technical · Medium
- What are the various strategies used by recommendations engines?Google · AI & Technical · Medium
More questions from Amazon
Learn the skill behind it
Chapters of the AI PM course that teach what this question tests.
- Chapter 1: Foundations: the model and the decisions it forces on you
- Chapter 8: Evals: define good and make the number defensible
- Chapter 6: Agents and agentic architecture