IaaS, PaaS and SaaS
Cloud services are grouped by how much of the stack the provider manages for you. Picture the layers of a running application, from the physical building up to your data:
| Layer | On-premises | IaaS | PaaS | SaaS |
|---|---|---|---|---|
| Data and users | You | You | You | You (your data) |
| Application | You | You | You | Provider |
| Runtime and middleware | You | You | Provider | Provider |
| Operating system | You | You | Provider | Provider |
| Virtualisation | You | Provider | Provider | Provider |
| Servers, storage, network | You | Provider | Provider | Provider |
| Data centre | You | Provider | Provider | Provider |
IaaS: Infrastructure as a Service
You rent the building blocks (virtual machines, disks, networks) and manage everything from the operating system up: patches, runtime, application, scaling configuration.
- AWS examples: Amazon EC2, Amazon EBS, Amazon VPC.
- Good for: full control, lifting existing servers into the cloud, unusual software.
- Trade-off: you patch and operate the OS yourself.
PaaS: Platform as a Service
You hand over your code; the platform provisions the servers, runtime, load balancer and scaling for you.
- AWS examples: AWS Elastic Beanstalk, AWS App Runner, and in a broader sense managed databases such as Amazon RDS.
- Good for: developers who want to ship code without managing servers.
- Trade-off: less control over the underlying machines.
SaaS: Software as a Service
A complete application you just use, usually through a browser. The provider runs everything; you manage your users and data.
- Examples: web email, office suites, CRM systems. On AWS: Amazon WorkMail, Amazon Chime, and the products sold by third parties in AWS Marketplace.
Serverless services such as AWS Lambda and Amazon DynamoDB are often described as an extra step beyond PaaS (sometimes called FaaS, Functions as a Service): you don't even see an always-running platform, you are billed per request.
Model: who manages what?
The table above is easy to turn into code. This model answers "who is responsible for layer X under model Y?":
LAYERS = ["data", "application", "runtime", "os", "virtualisation", "hardware", "facility"]
# index of the first layer the provider manages, per model
PROVIDER_FROM = {"on-premises": 7, "iaas": 4, "paas": 2, "saas": 1}
def manager(model, layer):
return "provider" if LAYERS.index(layer) >= PROVIDER_FROM[model] else "you"
print(f"{'layer':<15}" + "".join(f"{m:>13}" for m in PROVIDER_FROM))
for layer in LAYERS:
print(f"{layer:<15}" + "".join(f"{manager(m, layer):>13}" for m in PROVIDER_FROM))layer on-premises iaas paas saas
data you you you you
application you you you provider
runtime you you provider provider
os you you provider provider
virtualisation you provider provider provider
hardware you provider provider provider
facility you provider provider provider
Model: picking a model for a team
A simple scoring helper: each requirement points towards more control (IaaS) or less operations work (PaaS/SaaS).
def recommend(needs_custom_os, has_ops_team, building_own_app, wants_zero_servers):
if not building_own_app:
return "SaaS: buy the finished product"
if needs_custom_os:
return "IaaS: e.g. EC2, you control the operating system"
if wants_zero_servers:
return "Serverless: e.g. Lambda + DynamoDB"
if has_ops_team:
return "IaaS or PaaS: both work, PaaS saves effort"
return "PaaS: e.g. Elastic Beanstalk, the platform runs the servers"
teams = {
"HR team needs email": (False, False, False, False),
"Legacy app needs old kernel":(True, True, True, False),
"Start-up, two developers": (False, False, True, False),
"Event-driven image resizer": (False, False, True, True),
}
for name, answers in teams.items():
print(f"{name:<29} -> {recommend(*answers)}")HR team needs email -> SaaS: buy the finished product
Legacy app needs old kernel -> IaaS: e.g. EC2, you control the operating system
Start-up, two developers -> PaaS: e.g. Elastic Beanstalk, the platform runs the servers
Event-driven image resizer -> Serverless: e.g. Lambda + DynamoDB
Common mistakes
- Thinking PaaS means "no responsibility". You still own your code, its dependencies, its configuration and your data.
- Treating the categories as strict boxes. Real services blur the lines: Amazon RDS gives you a managed database engine (PaaS-like) that still runs on instances you size yourself (IaaS-like).
Test yourself
Which service model gives you the most control over the operating system?
- SaaS
- PaaS
- IaaS
- FaaS
AWS Elastic Beanstalk, which deploys your code onto managed servers, is usually classed as ...
- IaaS
- PaaS
- SaaS
- On-premises
Under SaaS, what are you still responsible for?
- Patching the OS
- Your data and users
- The data centre
- The runtime