Lesson 3 of 30
Three ways to run code on AWS, and they aren't ranked best-to-worst — they trade control for convenience along one axis, and the right answer depends entirely on the shape of the workload, not a general preference.
14 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
A batch job occasionally needs 25 minutes to complete. Why can't this run on Lambda as-is?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
Every AWS compute option sits somewhere on a single spectrum: how much infrastructure do you manage versus how much control do you have over it?
Lambda: no server to manage at all, billed per invocation, a hard 15-minute execution cap.
An API endpoint that resizes an uploaded image could run as:
"Would you use Lambda or a container for this?" tests whether a candidate reasons from the workload's actual shape — traffic pattern, execution duration, cost at scale — rather than defaulting to whichever option is trendiest. Naming the specific tradeoff (spiky and short vs. sustained and long-running) is a stronger answer than a blanket preference for either.