The mental model

Compute runs your code, but each runtime exposes a different operating boundary. EC2 gives you virtual machines and responsibility for their operating systems. Container services schedule packaged processes. Lambda runs functions in response to events with service-specific limits. None removes the need to understand resource usage and failure behavior.

Start with execution duration, traffic variability, operating-system requirements, startup latency, and the team’s operating skills. A long-running process with custom host requirements may fit EC2. A short event handler may fit Lambda. Moving between models can change networking, identity, deployment, and cost, even when application code looks similar.

Decisions to make

  1. Choose EC2 when host-level control is a real requirement, with a patching and recovery plan.
  2. Choose an event-driven runtime when its execution model and limits match the work.

Design exercise · no AWS resources needed

Work through a scenario

You need to run a continuous video worker and a short webhook handler.

  1. Write each workload’s duration, host requirements, and traffic pattern.
  2. Choose a candidate runtime for each workload.
  3. Identify one runtime limit and one operating task that must be verified.

Check your understanding

Which is a useful first input to a compute decision?

Continue with AWS documentation

Before following a deployment guide, review current pricing, permissions, and cleanup steps. Budget alerts are not a hard spending cap.

Saved in this browser. Press again to undo.

Prepaid · USD

Top up balance

Available balance: $0.00

Your balance works across Heap tools. A failed lookup or generation releases its reserved amount.