EC2 and Lambda are both compute, but they sit at opposite ends of the control-vs-convenience spectrum. The exam wants you to pick based on the workload.
The difference in one line
EC2 is a server you run and manage — full control, always on, priced by uptime. Lambda is serverless functions — no servers, runs on triggers, priced per request, but capped at 15 minutes. Long-running, stateful, or full-OS-control workloads → EC2. Short, event-driven, spiky, or unpredictable workloads → Lambda.
Test yourself
A workload runs continuously all day at steady load and needs full control over the operating system. Which compute option fits best?
- AWS Lambda
- Amazon EC2
- API Gateway
- Amazon SQS
👉 Click to reveal the answer & explanation
Correct answer: B. Steady, always-on workloads that need OS control suit EC2. Lambda (A) is capped at 15 minutes and meant for event-driven bursts; API Gateway (C) and SQS (D) aren’t compute for running a full workload.
Related topics
Amazon EC2 · AWS Lambda · ECS vs EKS vs Fargate
Ready to pass your AWS exam?
Stop guessing whether you’re ready. Our full-length, exam-realistic practice exams put you through the exact question style you’ll face — with a detailed explanation behind every answer, so you learn why, not just what.
- ✓ 6 full-length practice exams
- ✓ A detailed explanation for every single question
- ✓ Realistic, scenario-based questions — not memory dumps
- ✓ Lifetime access, kept current for 2026