Amazon logo

Amazon Backend Engineer System Design Questions

40 practice questions for Amazon Backend Engineer interviews

Amazon backend engineer interviews typically focus on APIs, databases, system design, concurrency, caching, and data structures.

All Roles Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer

No verified questions yet for Amazon.

system design Senior messaging #1

1. [OA] Messaging Queue — Implementing a Stream Processing Service for Amazon

To handle asynchronous processing in Amazon's services, we need a robust messaging queue service.
Problem statement: Design a MessageQueue class that supports the following methods:
- void send(string message): to add a new message to the queue.
- string receive(): to retrieve and remove a message from the front of the queue, returns an empty string if the queue is empty.
- int size(): returns the number of messages currently in the queue.
Example 1:
Input: MessageQueue mq = new MessageQueue();
mq.send("msg1");
Output: null
mq.send("msg2");
Output: null
mq.receive();
Output: "msg1"
mq.size();
Output: 1
Constraints:
- The number of messages will not exceed 10^4.
system design Senior api design #2

2. [OA] RateLimiter — Design a Service to Control API Requests

To maintain the performance of APIs across Amazon's services, implementing a rate limiting mechanism is crucial.
Problem statement: Design a RateLimiter class that controls requests to an API. It should allow a maximum of limit requests per second. Implement the following methods:
- bool allowRequest(string userId): returns true if the request should be allowed.
- int getRequestCount(string userId): returns the number of requests made by the user in the last second.
Example 1:
Input: RateLimiter rateLimiter = new RateLimiter(5);
rateLimiter.allowRequest("user1");
Output: true
rateLimiter.allowRequest("user1");...
// After 6 calls, the 6th should return false
Output: false
Constraints:
- 1 <= limit <= 100
- 1 <= userId.length <= 30.

Related Amazon Backend Engineer interview prep

Start practicing Amazon questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free