AWS Cloud Practitioner CLF-C02 Sign in Try 10 free questions

EC2 vs Lambda: free CLF-C02 practice questions

A server you control, or serverless functions — the exam's favourite compute fork. Six questions on the real differences, CLF-C02, 2026 edition.

Try 6 free EC2-versus-Lambda questions in the exam's own style — every answer explained, no sign-up — and settle the fork for good.

Straight to the 6 free questions ↓

EC2 versus Lambda is the exam’s favourite compute fork, and it is worth settling properly because the same choice hides inside questions that never name either service. The one-line version — short and event-driven is Lambda, long-running and controlled is EC2 — is a good start, but the exam probes the edges: cost, scaling, duration and state.

The core difference

Amazon EC2 is a server you control: you pick the size, manage the operating system, and it runs until you stop it. AWS Lambda is serverless: you supply a function, AWS runs it on demand, and there is no server for you to manage. Everything else follows from that.

Where the exam probes

  • Cost. EC2 bills for the time the instance runs — including idle time. Lambda bills per request and per millisecond of run time, with nothing while idle. So intermittent work is cheaper on Lambda; steady 24/7 work is usually cheaper on a committed EC2 instance. Lambda is not always cheaper — the usage shape decides.
  • Scaling. Lambda scales automatically per request. EC2 scales through Auto Scaling that you configure.
  • Duration. A Lambda function has a maximum execution time and suits short tasks; EC2 can run continuously.
  • State. Lambda is stateless — keep data in a database or S3. EC2 can hold state on its disk between requests.

Reading the workload

Almost every question is a workload wearing a scenario. Read it for the signals:

  • Short, event-driven, intermittent, no servers to manage → Lambda.
  • Long-running, stateful, needs OS control, or a steady 24/7 load → EC2.

If it names “a monolith that runs constantly and stores data locally,” that is EC2 with the least rework. If it names “run a function when a file is uploaded,” that is Lambda.

How to use the questions below

Answer each one before you reveal the explanation, and when you miss, read past the correct letter to why the other option is wrong. The distractors here are usually the right service for the wrong reason — Lambda offered as “always cheaper,” EC2 offered as “the only one that scales.” Getting the reason right, not just the service, is what carries into the exam. For the wider storage side of this pairing, see the S3 storage classes; for the whole map, the cheat sheet.

Amazon EC2 versus AWS Lambda side by side: EC2 is a server you control and pay for while it runs, scaled with Auto Scaling, able to run continuously and hold state; Lambda is serverless, billed per request with nothing charged while idle, scaled automatically, stateless and limited to short executions.

6 free CLF-C02 practice questions

Answers and explanations — no email wall
CLF-C02 Question 1 of 6

A task runs for a few seconds once an hour and does nothing in between. Which option is usually more cost-effective, and why?

Answer: A — AWS Lambda, because you pay only for the few seconds it runs and nothing while idle

For a job that runs briefly and is idle most of the time, Lambda's pay-per-invocation model wins — you are not paying for an idle server. Why not the others: an EC2 instance is billed for all the hours it runs, including the idle time between tasks. The costs are not equal for an intermittent workload. And Lambda can be run on a schedule, so that objection is false.

CLF-C02 Question 2 of 6

How does scaling differ between EC2 and Lambda?

Answer: A — Lambda scales automatically per request; EC2 scales through Auto Scaling that you configure

Lambda scales on its own — more requests simply run more concurrent executions. EC2 scales by adding or removing instances through EC2 Auto Scaling, which you set up. Why not the others: it is not reversed, both can scale, and neither requires launching every unit by hand for scaling. Automatic per-request versus configured Auto Scaling is the difference.

CLF-C02 Question 3 of 6

Which is a limitation of AWS Lambda compared with Amazon EC2?

Answer: A — A Lambda function has a maximum execution time, so it suits short tasks, while EC2 can run continuously

Lambda functions are capped at a maximum run time and are meant for short, event-driven work; a long-running or always-on process belongs on EC2. Why not the others: Lambda absolutely runs code — that is its whole purpose. It is not always more expensive; for intermittent work it is usually cheaper. And it is serverless, so you do not patch any OS. The real limitation is execution duration.

CLF-C02 Question 4 of 6

A predictable workload runs continuously, 24/7, at steady high utilisation. Which is likely the more cost-effective choice?

Answer: A — Amazon EC2, especially with a Reserved Instance or Savings Plan for the steady usage

For a constant, high-utilisation workload, a committed EC2 instance (Reserved or Savings Plan) is typically cheaper than paying Lambda per invocation for work that never stops. Why not the others: Lambda is not always cheaper — its advantage is idle time, which this workload does not have. EC2 runs continuously by design. And both can technically run it; the question is cost.

CLF-C02 Question 5 of 6

Which statement about state is correct for EC2 and Lambda?

Answer: A — Lambda is stateless — each invocation is independent — while an EC2 instance can hold state on its disk between requests

Lambda functions are stateless: you should not rely on data persisting from one invocation to the next, so state is kept in a database or S3. An EC2 instance keeps files on its attached storage across requests. Why not the others: it is not reversed, both can store data (elsewhere or on disk), and EC2 is not stateless. Design Lambda as stateless.

CLF-C02 Question 6 of 6

A company is migrating a monolithic application that runs constantly and stores data on its local disk. Which compute service fits with the least rework?

Answer: A — Amazon EC2

A constantly running, stateful monolith maps most directly onto an EC2 instance — a server it can run on much as it did before. Why not the others: moving it to Lambda would mean breaking it into short, stateless functions — significant rework. S3 is storage and DynamoDB is a database; neither runs the application. Least rework for a running monolith is EC2.

That is exactly how every question in the course works — answer, explanation, why-not. The real set continues in the practice player: 10 free questions, no sign-up.

Continue with the 10 free questions →

Those 6 questions were the start.

The exam does not test whether you recognise a term — it tests whether you can rule out three plausible answers under time pressure. That is what the explanations above are for, and there are 390 more questions built exactly like them.

Collecting questions yourself

  • Scattered across forums, of unknown age
  • Answer keys without reasoning
  • No idea which domain you are weak in

Practising with a system

  • 390 questions in 6 full tests, CLF-C02 (2026)
  • Every option explained — including the wrong ones
  • Readiness per exam domain, and drills for your weakest
Start free — 10 questions

Straight into the player. No account, no email.

Frequently asked questions

Is this the current CLF-C02 format?
Yes — these questions follow the CLF-C02 exam guide (2026 edition). EC2 and Lambda both sit in the Cloud Technology and Services domain, the largest at 34%, and the choice between them recurs across the exam.
Are these real exam questions?
No. They are our own questions, written in the style and difficulty of the exam. Reproducing real exam items violates the AWS certification agreement and can get your certification revoked, and a memorised item teaches you nothing about the one you have not seen.
What is the one-line rule for EC2 vs Lambda?
Short, event-driven, intermittent work with no servers to manage points to Lambda. Long-running, stateful, or OS-controlling work points to EC2. Read the workload for those signals and the choice follows.
Is Lambda always cheaper than EC2?
No. Lambda is cheaper when work is intermittent, because you pay nothing while idle. For a steady 24/7 workload, a committed EC2 instance is usually cheaper. Cost depends on the usage shape, not on the service alone.

Updated for CLF-C02 (July 2026). The sample questions above are our own work in the style of the exam — not real exam items. The exam itself is set and marked by the certification body.