Cloud Notes
Comprehensive overview of cloud service models - IaaS, PaaS, SaaS, and FaaS - with comparison tables, real-world examples, and guidance on choosing the right model.
Cloud service models define what level of the computing stack is managed by the cloud provider versus the customer. Understanding these models is fundamental to making informed architectural decisions about where your responsibilities begin and end.
The Pizza Analogy
The most intuitive way to understand cloud service models is through a pizza analogy:
| Toppings | Toppings | Toppings | (Nothing) | |||||
|---|---|---|---|---|---|---|---|---|
| Cheese | Cheese | |||||||
| Sauce | Sauce | |||||||
| Dough | ||||||||
| Oven | ||||||||
| Kitchen |
Service Model Comparison
| Layer | On-Premises | IaaS | PaaS | SaaS |
|---|---|---|---|---|
| Applications | You | You | You | Provider |
| Data | You | You | You | Provider |
| Runtime | You | You | Provider | Provider |
| Middleware | You | You | Provider | Provider |
| Operating System | You | You | Provider | Provider |
| Virtualization | You | Provider | Provider | Provider |
| Servers | You | Provider | Provider | Provider |
| Storage | You | Provider | Provider | Provider |
| Networking | You | Provider | Provider | Provider |
IaaS - Infrastructure as a Service
IaaS provides virtualized computing resources over the Internet. You rent virtual machines, storage, and networking, but manage everything from the OS upward.
Examples: AWS EC2, Azure Virtual Machines, Google Compute Engine, DigitalOcean Droplets
You Control: OS, applications, data, middleware, runtime Provider Controls: Physical hardware, networking, storage, virtualization
PaaS - Platform as a Service
PaaS provides a platform for developing, testing, and deploying applications without managing underlying infrastructure. You focus entirely on your code.
Examples: Heroku, AWS Elastic Beanstalk, Google App Engine, Azure App Service
# Deploy to PaaS - no server management needed
# Heroku example
git push heroku main
# AWS Elastic Beanstalk
eb init my-app --platform python-3.9
eb create production
eb deploy
# Google App Engine
gcloud app deploy app.yaml# app.yaml for Google App Engine
runtime: python39
instance_class: F2
automatic_scaling:
min_instances: 1
max_instances: 10
target_cpu_utilization: 0.65You Control: Application code, data Provider Controls: Runtime, middleware, OS, virtualization, hardware
SaaS - Software as a Service
SaaS delivers complete applications over the Internet on a subscription basis. Users access software through a web browser without installing or managing anything.
Examples: Gmail, Salesforce, Slack, Microsoft 365, Zoom, Dropbox
You Control: Data, user configuration Provider Controls: Everything else (application, runtime, infrastructure)
FaaS - Function as a Service
FaaS (serverless computing) lets you run code in response to events without managing any servers. You pay only for actual execution time.
Examples: AWS Lambda, Azure Functions, Google Cloud Functions
# AWS Lambda function - you write ONLY this
import json
def handler(event, context):
name = event.get('name', 'World')
return {
'statusCode': 200,
'body': json.dumps(f'Hello, {name}!')
}
# Provider manages: servers, scaling, OS, runtime, availability
# You pay: per invocation (first 1M free) + compute timeWhen to Choose Each Model
| Scenario | Recommended Model | Reason |
|---|---|---|
| Full infrastructure control needed | IaaS | Complete OS/network control |
| Rapid application development | PaaS | Focus on code, not servers |
| Standard business software | SaaS | Zero management overhead |
| Event-driven microservices | FaaS | Pay only for execution |
| Legacy application migration | IaaS | Lift-and-shift compatibility |
| Startup MVP | PaaS/SaaS | Fastest time to market |
| Compliance requiring OS control | IaaS | Audit and harden OS yourself |
Cost Comparison
| │ IaaS (Self-managed) | │ |
| │ PaaS (Managed) | │ |
| │ SaaS (Pre-built) | │ |
| │ FaaS (Serverless) | │ |
Interview Questions
- Explain IaaS, PaaS, and SaaS with examples.
IaaS provides virtual infrastructure (EC2, Azure VMs) where you manage OS upward. PaaS provides a development platform (Heroku, App Engine) where you manage only code and data. SaaS delivers complete applications (Gmail, Salesforce) where users just consume the software.
- What is the shared responsibility model across service models?
Responsibility shifts from customer to provider as you move from IaaS to SaaS. In IaaS, the customer manages applications, data, runtime, and OS. In PaaS, only applications and data. In SaaS, customers manage only their data and access policies.
- When would you choose IaaS over PaaS?
Choose IaaS when you need full control over the operating system, custom runtime configurations, specific security hardening, support for legacy applications, or when your application requires unique dependencies that PaaS platforms don't support.
- How does FaaS differ from traditional PaaS?
FaaS executes individual functions in response to events with automatic scaling to zero (no idle costs), sub-second billing, stateless execution, and no server management. PaaS runs persistent applications that consume resources even when idle.
- Can organizations use multiple service models simultaneously?
Yes, most enterprises use a mix. For example, running a custom ML model on IaaS (EC2 with GPUs), deploying a web frontend on PaaS (App Service), using SaaS for email (Office 365), and connecting them with FaaS (Lambda for event processing).
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Cloud Service Models.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Cloud Computing topic.
Search Terms
cloud-computing, cloud computing, cloud, computing, fundamentals, service, models, cloud service models
Related Cloud Computing Topics