How it works · 3 of 38 Foundation

IaaS vs PaaS vs SaaS vs serverless: what is the difference?

How much you rent

IaaS, PaaS, SaaS & serverless: Cloud services differ in how much the provider runs for you: bare machines (IaaS), a ready platform for your code (PaaS), a finished app (SaaS), or code that runs only when something happens (serverless).

Loading the animation…

Say it like this IaaS rents you machines, PaaS runs everything under your code, SaaS is a finished app, and serverless runs your code only when needed. In every one, who can reach your data is still your job.

Under the hood — for builders
Who runs what
The shared-responsibility split, layer by layer. P = the provider runs it, Y = you do.
Billing by the millisecond
Serverless bills only while code runs. Since December 2020, AWS Lambda rounds each run up to the next 1 ms; before, to the next 100 ms.
Paying for idle: a worked example
Example workload (ours, not a provider's): 100,000 requests a day, each running 200 ms. That's 20,000 seconds of work, about 5.6 hours. An always-on server is paid for all 24 hours; serverless for the 5.6 hours of work, plus a small fee per request.
Watch out
Cold starts: the first request after a quiet spell waits while the code loads. Time limits: a Lambda run stops at 15 minutes. Lock-in: the further up the cake the provider runs, the harder it is to move.
Measure it
Utilisation: how much of the time you pay for is doing work. Low and spiky favours serverless; high and steady favours renting machines.
Sources
NIST SP 800-145, The NIST Definition of Cloud Computing (2011) · AWS What's New, Dec 2020 (1 ms billing) · AWS Lambda quotas (15-minute timeout).

What happens in the IaaS, PaaS, SaaS & serverless animation, step by step?

  1. Every app stands on the same six layers, from the building up to your code and data.
  2. IaaS: you rent the machines. The provider runs the building and hardware; every layer above is your job.
  3. PaaS: you bring only your code; they keep the system under it patched and running.
  4. SaaS: you just use a finished app. But your data, and who can see it, are still yours to look after.
  5. Serverless: your code wakes only when something happens, and you pay by the millisecond while it runs.
  6. Your turn: an urgent fix is out for the operating system. Tap the model where YOU must install it.

What everyday example explains IaaS, PaaS, SaaS & serverless?

Feeding guests. Rent a kitchen and do the shopping, cooking and washing up (IaaS); get a meal kit and just follow the recipe (PaaS); eat at a restaurant, choosing only what to order (SaaS); or hire a caterer who turns up only when guests arrive and charges per plate (serverless).

Why should a team care about IaaS, PaaS, SaaS & serverless?

The choice decides how much your team must maintain, whether you pay for machines sitting idle, and who is to blame when something wasn't patched.