Design Account Takeover Detection for Amazon Customer Sign-Ins
Last updated: November 29, 2026
Quick Overview
Design an ML system that scores each Amazon sign-in and sensitive account action (address change, gift card redemption, payment change) for takeover risk and decides whether to allow, challenge, or block.
Amazon
November 29, 20260
0
0 solved
Design an ML system that scores each Amazon sign-in and sensitive account action (address change, gift card redemption, payment change) for takeover risk and decides whether to allow, challenge, or block.
An ML system design question in the style of Amazon's buyer risk and identity teams. The interviewer wants a layered decision system rather than one classifier, low-latency features at sign-in, label delay handling, and a careful trade-off between friction and losses.
What the Interviewer Expects
- Scores both the login and later sensitive actions in the session
- Builds device, network and behavioral features in real time
- Explains where labels come from and their delay
- Maps scores to graded actions such as OTP challenge
- Handles adversarial adaptation and credential stuffing bursts
- Measures friction and false positive cost, not just fraud caught
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How do you handle a customer traveling abroad on a new device?
- How would you detect a large credential stuffing attack early?
- What features would you avoid for fairness or privacy reasons?
- How do you evaluate a model when challenged sessions never reveal the label?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
M
- Decision on every sign-in and on sensitive actions, under 50 ms.
- Actions: allow, step-up challenge (OTP, passkey prompt), block and notify.
- Objective: minimize account takeover losses and custom...
L
- Request signals: device ID and fingerprint, IP, ASN, geolocation, user agent, login method, typing cadence if available.
- Real-time feature service: per-account history (known devices, us...