Course contentsShow
← Cloud and Infrastructure
Lesson 17 of 2,9891. Cloud Computing FundamentalsFree lesson

Function as a Service (FaaS) Introduction

Learn about serverless functions, event-driven execution, and FaaS positioning.

Function as a Service (FaaS) Introduction

What you'll learn: Understand how FaaS lets you run code without managing servers, paying only when your functions actually execute.

What is Function as a Service?

Function as a Service (FaaS) represents the next evolution beyond IaaS, PaaS, and SaaS. With FaaS, you write individual functions—small pieces of code that perform specific tasks—and the cloud provider handles everything else: servers, scaling, and infrastructure management.

Think of FaaS like a food delivery service. You don't own a restaurant (server), hire staff (manage infrastructure), or keep the kitchen running 24/7. You simply order food (trigger a function) when you're hungry, and it arrives ready to consume. When you're not ordering, you pay nothing.

Event-Driven Execution

FaaS functions execute in response to events. An event might be:

  • A file uploaded to cloud storage
  • An incoming HTTP request
  • A scheduled timer (like a cron job)
  • A message arriving in a queue

Your function "wakes up" when the event occurs, processes the task, then goes dormant. You're charged only for the milliseconds your code actually runs.

Where FaaS Fits in Cloud Computing

Recall the responsibility model from earlier lessons:

  • IaaS: You manage applications, runtime, and OS
  • PaaS: You manage applications only
  • SaaS: You manage nothing but usage
  • FaaS: You manage only individual function code

FaaS is sometimes called "serverless" (though servers still exist—you just don't see or manage them). It represents the highest level of abstraction for compute services.

Why Use FaaS?

  • Zero infrastructure management
  • Automatic scaling (from zero to thousands of executions)
  • Pay-per-use pricing (no idle server costs)
  • Perfect for event-driven, intermittent workloads

Key Takeaway: Function as a Service lets you run individual code functions triggered by events, with the cloud provider managing all infrastructure, scaling, and charging you only for actual execution time.