Amazon Applied AI Engineer OA: What to Expect
Updated 2026-11-21
If you're preparing for the Amazon Applied AI Engineer online assessment, this guide covers the full format, timing and strategy — without spoiling any questions. The OA has a unique structure that combines traditional DSA coding with AI-assisted debugging of a real Django codebase, plus behavioral assessments. Knowing what to expect going in saves you 10–15 minutes of orientation time you'd otherwise spend figuring out the interface.
Overall structure
The OA has three parts, all taken in one sitting in a browser-based proctored environment:
| Part | Time | Format |
|---|---|---|
| Coding challenge | ~100 min | 2 problems: one DSA, one AI-assisted debugging |
| Work simulation | ~15 min | Scenario-based multiple choice |
| Work style survey | ~10 min | Likert-scale agree/disagree statements |
Budget roughly 40 minutes for the DSA problem and 60 minutes for the debugging problem. The debugging question takes longer than it looks because you're reading a full codebase, not solving a single function.
Part 1a: The DSA problem (~40 min)
You get a single algorithmic problem with a function signature already provided. You write your solution in Python and run it against hidden test cases (typically 8–12).
Difficulty and type
Expect a medium to medium-hard problem that combines two or more techniques. The problem often involves:
- Sliding window over intervals or coordinate-based data
- Prefix sums with binary search on sorted data
- Greedy algorithms with sorting
- Dynamic programming (1D or 2D)
- Graph traversal on grid or adjacency structures
Key characteristics
- Input sizes can be very large (coordinates up to 10⁹), meaning brute-force array construction won't work
- You may need to work with intervals (start/end ranges) rather than individual elements
- The answer often requires a modulo operation (
10**9 + 7) - An O(n²) solution may pass 60–70% of test cases; O(n log n) is usually needed for full marks
Strategy
Get a correct brute-force version passing first, then optimize. A solution that scores 7/10 is better than an optimized one that crashes on edge cases.
Watch out for two common traps:
- Off-by-one errors on inclusive ranges. If bags/positions are inclusive, the overlap between two ranges is
min(end1, end2) - max(start1, start2) + 1. Using<instead of<=in the overlap check drops single-element overlaps. - Modulo operator precedence.
x % 10**9 + 7parses as(x % 10**9) + 7. Always defineMOD = 10**9 + 7and usex % MOD.
What to practice
- Sliding window over sorted intervals (LeetCode 2271 "Maximum White Tiles Covered by a Carpet" is a close match)
- Prefix sums + binary search (Python's
bisectmodule) - Two-pointer techniques on sorted arrays
- Interval overlap calculations with inclusive boundaries
Part 1b: AI-assisted debugging (~60 min)
This is the unique part. You receive a broken Django REST Framework project with a full codebase and a failing test suite. Your job is to find and fix all the bugs so every test passes.
The environment
You work in a VS Code–style browser editor with:
- Multiple project files (typically 5–8 files)
- A terminal to run tests (
python manage.py test) - An AI Assistant panel you can ask questions
Project structure
Expect a standard Django/DRF project. The file layout looks something like this:
| File | Editable? | Contains |
|---|---|---|
README.md |
Read-only | The API spec: endpoints, data formats, algorithms, scoring formulas |
views.py |
Yes | API endpoint handlers — where most bugs live |
models.py |
Sometimes | Django models (usually correct) |
serializers.py |
Sometimes | DRF serializers (may have a bug) |
urls.py |
Read-only | URL routing |
test/test_app.py |
Read-only | The test suite with ~6 failing tests |
Important: The bugs are concentrated in 2–3 files, primarily views.py. The tests and URL config are always correct — don't waste time questioning them.
What "6 failing tests" means
There are typically 6 tests and 6 bugs, with a rough one-to-one mapping. Each test validates one specific behavior, and each bug breaks exactly one test. The bugs are small, realistic mistakes — the kind a junior developer might make:
- Wrong HTTP status codes — returning 200 instead of 201 on creation, or 400 instead of 404 for a missing resource
- Flipped or inverted conditions —
!=where it should be==, or a missingnot - Missing authorization checks — any user can perform an action that should be restricted to the resource owner
- Wrong parameter names — reading
"state"from query params when the client sends"status" - Missing input validation — not checking that a required field is non-empty before saving
- Missing persistence — calling
serializer.is_valid()but forgetting.save(), so the response returns stale data - Missing key in JSON response — the response payload is missing a field the test expects
- Wrong query filter — not filtering/excluding properly, so the wrong set of results comes back
Not every OA will have all of these, but they draw from this pool.
How to read test failures
1. Read the assertion literally. assert status == 404 failing with 400 != 404 tells you the view is returning the wrong status code — not that the lookup logic is broken.
2. Look for swapped pairs across tests. If test A expects "Found" but gets "No results" and test B expects "No results" but gets "Found", a condition is flipped somewhere (== vs !=).
3. Watch for KeyError. A KeyError: 'recommendations' means the JSON response is missing a key the test expects. Look at the return JsonResponse(...) or return Response(...) call, not the scoring logic.
4. Fix one bug, then rerun. Don't stack multiple fixes before running. After each fix, rerun the entire suite to see which tests changed status. This prevents accidentally introducing new bugs while fixing old ones.
5. Compare similar code paths. Two branches that should look alike (a rated-high vs. rated-low handler, or a GET vs. POST branch in the same view) usually differ by exactly one planted bug. Diff them side by side.
Using the AI Assistant
The assistant can help you locate code but won't explain the spec or write fixes. Ask "which line" questions:
Questions that work:
- "Which line decides the HTTP status code for the POST response?"
- "Which condition decides between the success and empty-results message?"
- "Which line builds the JSON response that the test reads?"
- "Which query picks the candidate items in the high-rating branch?"
- "Which line sets the
sourcefield for watched-only items?"
Questions that don't work:
- "What multiplier should apply here?" (spec question — read the README)
- "Is this list sorted before slicing?" (it won't confirm logic rules)
- "What's the fix for this bug?" (it won't give solutions)
What to practice
Comfort with Django/DRF is essential. Before the OA, make sure you can:
- Read a DRF
@api_viewfunction and trace the request lifecycle - Understand
serializer.is_valid(),serializer.save(), andserializer.data - Work with
request.query_params,request.data, andrequest.user - Know the HTTP status codes: 200 (OK), 201 (Created), 204 (No Content), 400 (Bad Request), 403 (Forbidden), 404 (Not Found)
- Read Django ORM queries:
.filter(),.exclude(),.get(),.exists() - Understand
JsonResponsevs DRF'sResponse - Run
python manage.py testand read pytest/unittest output
Part 2: Work simulation (~15 min)
Short scenarios that simulate a day at Amazon. Each presents a situation (an email from a manager, a customer escalation, conflicting deadlines) and asks you to pick the best and worst response from 4–5 options.
How to approach it
Think through Amazon's Leadership Principles. The five that come up most:
| Principle | What it means in context |
|---|---|
| Customer Obsession | Start from the customer and work backwards, even if it means extra effort |
| Ownership | Don't say "that's not my job" — act on behalf of the whole company |
| Bias for Action | A reversible decision made quickly beats a perfect one made slowly |
| Dive Deep | Don't accept surface explanations. Look at the data and understand root causes |
| Deliver Results | Focus on the key outcomes, not just activity. Remove blockers |
The "worst" answer is usually the one that passes the problem to someone else, ignores the customer impact, or takes the safe/slow path when urgency is needed.
Part 3: Work style survey (~10 min)
Agree/disagree statements on a 5-point Likert scale. These are behavioral and personality questions.
- Consistency matters. The same trait is asked several ways throughout. If you "strongly agree" that you take ownership in one question, don't "disagree" with a rephrased version of the same idea.
- Lean toward taking ownership, holding high standards, being data-driven, and acting quickly with calculated risk.
- Avoid fence-sitting on everything. Answering "neutral" to most questions signals disengagement.
Suggested time plan
| Minutes | Do |
|---|---|
| 0–5 | Scan both coding problems. Start with whichever you're more comfortable with |
| 5–40 | DSA problem. Get a correct brute-force solution first, then optimize if time allows |
| 40–50 | Read the debugging README carefully. Run the tests once to see all failures |
| 50–95 | Fix one bug at a time: read failure → find code → fix → rerun |
| 95–100 | Final run. Don't start a risky refactor |
Common mistakes
- Spending too long on DSA optimization. A 70% score on Q1 plus 100% on Q2 beats a 100% Q1 and 50% Q2. The debugging problem has more low-hanging fruit.
- Not reading the README spec. The debugging README contains exact specifications (scoring formulas, field names, edge-case behavior). Many bugs only make sense once you've read it.
- Stacking fixes before rerunning. Fix one thing, run tests, see what changed. This prevents compounding errors.
- Modifying the tests or URL config. These files are correct. If a test seems wrong, re-read the spec.
- Asking the AI assistant spec questions. It helps with where, not what. Read the README for the spec; ask the assistant to point you to code.
How to practice
- DSA: Practice sliding window, prefix sums and binary search on intervals. Know Python's
bisectmodule. LeetCode problems 2271 and 2555 are relevant patterns. - Django/DRF: Build a small CRUD API from scratch. Know the request lifecycle, serializer patterns and status codes by heart.
- Reading test output: Practice running
pytest -vorpython manage.py test -v2and interpreting assertion failures quickly. - Leadership Principles: Read through all 16 Amazon LPs. Focus on Customer Obsession, Ownership, Bias for Action, Dive Deep and Deliver Results.
- Practice debugging challenges: Try the multi-file Django debugging challenges on GenAI Dojo — they mirror the OA format with a project codebase, 6 failing tests and planted bugs you have to find and fix.