Skip to content

CLF-C02 · Study Guide

← Chapter 3: Compute

3.2

Lambda (incl. EC2 vs Lambda)

Run code without managing servers; ideal for event-driven, short-lived work.

Key points

  • Use cases: events, APIs, S3 triggers, automation.
  • Lambda: AWS manages infrastructure; you manage code and config.
  • EC2 for long-running; Lambda for event-driven.

AWS Lambda

Lambda is a serverless compute service. You can run code without managing traditional servers.

Typical use cases

  • Event processing
  • APIs
  • S3 events
  • Automation
  • Backend functions

EC2 vs Lambda

EC2Lambda
Virtual serverServerless function
More infrastructure controlLess infrastructure management
Suitable for long-running workloadsCommonly used for event-driven workloads
Customer manages the OSAWS manages the underlying infrastructure

Exam focus

Serverless / function / no server management → Lambda.