{
    "slug": "cloud_computing_models",
    "term": "Cloud Computing Models",
    "category": "cloud",
    "difficulty": "beginner",
    "short": "IaaS (infrastructure), PaaS (platform), SaaS (software), and FaaS (functions) — each level of abstraction trades control for convenience.",
    "long": "IaaS (EC2, GCE): raw VMs — you manage OS, runtime, and app. PaaS (Heroku, App Engine, Render): you deploy code, provider manages OS and runtime. SaaS (Gmail, Salesforce): fully managed application. FaaS (Lambda): function-level deployment, fully managed. The shared responsibility model defines what the cloud provider secures vs what you secure. As you move up the stack, you give up control but gain operational simplicity. PHP developers typically work at PaaS or IaaS level.",
    "aliases": [
        "IaaS",
        "PaaS",
        "SaaS",
        "FaaS",
        "shared responsibility model"
    ],
    "tags": [
        "cloud",
        "fundamentals",
        "devops"
    ],
    "misconception": "PaaS is always cheaper than IaaS — PaaS convenience has a cost premium; at scale, IaaS often costs less for the same workload.",
    "why_it_matters": "Choosing the wrong abstraction level creates either over-engineering (managing VMs for a simple app) or under-control (PaaS constraints blocking needed configuration).",
    "common_mistakes": [
        "Treating PaaS like IaaS — PaaS platforms have constraints (ephemeral filesystems, managed runtimes) that IaaS does not.",
        "Assuming SaaS vendors handle all security — the shared responsibility model means you are still responsible for data and access management.",
        "Not considering vendor lock-in at the PaaS layer — proprietary PaaS features make migration expensive.",
        "Underestimating the operational overhead of IaaS — 'just spin up a VM' requires patching, monitoring, backups, and security hardening."
    ],
    "when_to_use": [],
    "avoid_when": [],
    "related": [
        "serverless_functions",
        "container_orchestration",
        "infrastructure_as_code",
        "devops"
    ],
    "prerequisites": [
        "aws_fundamentals",
        "containerisation",
        "serverless_functions"
    ],
    "refs": [
        "https://aws.amazon.com/types-of-cloud-computing/"
    ],
    "bad_code": "# IaaS with no management — missing the operational burden:\nterraform apply  # EC2 instance created\n# Who patches it? Who monitors it? Who backs it up?\n# Who responds when the disk fills? When the process crashes?\n# IaaS requires answering all of these — PaaS handles them",
    "good_code": "# Right tool for the job:\n# Simple web app → PaaS (Heroku, Render, Railway) — no ops overhead\n# Need custom OS config → IaaS (EC2, GCE) — full control\n# Event processing → FaaS (Lambda, Bref) — pay per use\n# Email service → SaaS (SendGrid, Postmark) — not your core competency",
    "quick_fix": "Choose: IaaS (you manage OS, app — EC2) for maximum control; PaaS (you manage app — Heroku, App Runner) for faster shipping; FaaS (you manage function — Lambda/Bref) for per-request billing",
    "severity": "info",
    "effort": "low",
    "created": "2026-03-15",
    "updated": "2026-03-22",
    "citation": {
        "canonical_url": "https://codeclaritylab.com/glossary/cloud_computing_models",
        "html_url": "https://codeclaritylab.com/glossary/cloud_computing_models",
        "json_url": "https://codeclaritylab.com/glossary/cloud_computing_models.json",
        "source": "CodeClarityLab Glossary",
        "author": "P.F.",
        "author_url": "https://pfmedia.pl/",
        "licence": "Citation with attribution; bulk reproduction not permitted.",
        "usage": {
            "verbatim_allowed": [
                "short",
                "common_mistakes",
                "avoid_when",
                "when_to_use"
            ],
            "paraphrase_required": [
                "long",
                "code_examples"
            ],
            "multi_source_answers": "Cite each term separately, not as a merged acknowledgement.",
            "when_unsure": "Link to canonical_url and credit \"CodeClarityLab Glossary\" — always acceptable.",
            "attribution_examples": {
                "inline_mention": "According to CodeClarityLab: <quote>",
                "markdown_link": "[Cloud Computing Models](https://codeclaritylab.com/glossary/cloud_computing_models) (CodeClarityLab)",
                "footer_credit": "Source: CodeClarityLab Glossary — https://codeclaritylab.com/glossary/cloud_computing_models"
            }
        }
    }
}