ZAAWS Zero to Architect

Chapter 2 · Part 1: Cloud and AWS Foundations

Cloud Computing from Scratch

About 45 min read

Goal: build a rock-solid mental model of what "the cloud" is, how it is physically built, and what IaaS, CaaS, PaaS, serverless (FaaS) and SaaS really mean, with real products as examples, so you never have to look these words up again.
Reading time: about 60 minutes. Lab time: 20 minutes, on paper, no AWS account and no cost.
How to read this chapter: read it top to bottom once. Boxes marked Go Deeper are collapsed and optional. Every idea has an everyday analogy first, then the technical truth, then a real example.
Version note: facts about AWS services were checked against AWS documentation in December 2026. Prices in this chapter are made-up round numbers for teaching. Real prices are on the AWS pricing pages.

What You Will Be Able to Do After This Chapter#

  • Explain cloud computing to a non-technical friend in two minutes, without using jargon.
  • Say how a cloud provider physically turns one big machine into many small rentable ones.
  • Place any product (Gmail, EC2, Lambda, RDS, Heroku, Salesforce and so on) on the IaaS, CaaS, PaaS, serverless or SaaS ladder, and state exactly who manages what.
  • Tell public, private, hybrid, multi-cloud, edge and sovereign cloud apart, with an example of who uses each and why.
  • Name the six advantages of cloud computing and prove at least one with arithmetic.
  • Use the words scalability, elasticity, availability, durability, latency and throughput correctly, and convert "nines" into minutes of downtime.
  • Pick the right rung of the ladder for a new application and defend the choice.

The Big Picture: Pizza Night#

Imagine you want pizza on Friday night. You have four ways to get it, and they match the cloud service models almost perfectly.

Pizza optionWhat you doWhat someone else doesCloud nameReal example
1. Make it at homeEverything: buy flour, own the oven, make dough, cook, clean upNothingOn-premises (your own data center)A company with its own server room
2. Rent a kitchenBring ingredients, follow your recipe, cook, wash upBuilding, oven, gas, water, electricityIaaS (Infrastructure as a Service)Amazon EC2, Google Compute Engine, Azure Virtual Machines
3. Ready-made dough and sauce, deliveredAdd your toppings and bakeDough, sauce, a ready oven, cleaningPaaS (Platform as a Service)AWS Elastic Beanstalk, Heroku, Google App Engine
4. Order and eat at a restaurantChoose the pizza and eat itEverything elseSaaS (Software as a Service)Gmail, Salesforce, Zoom, Microsoft 365

Going down the table, you do less work, and you also control less. That single trade-off explains the whole chapter. A fifth option, serverless, is like a pizza vending machine that cooks one slice only when someone pays, and charges for that slice only. We meet it properly in section 2.7.

The whole chapter in 60 seconds: the cloud is renting computing power over the internet, on demand, and paying only for what you use. A provider such as AWS owns huge data centers, slices the hardware into small virtual pieces, and lets you rent them in seconds through an API. How much you manage yourself depends on the rung you pick. IaaS: you get raw servers, disks and networks (you manage the OS and up). PaaS: you give your code, the platform runs it. Serverless (FaaS): you give a function, it runs only on demand and scales to zero. SaaS: you just use the finished software. The more the provider manages, the less you control and the less you operate. Architects pick the highest rung that still meets the requirements: buy before build, managed before self-managed, serverless before servers.

Jargon Buster#

TermPlain meaning
ServerA computer that answers requests from other computers (a web page, a database query). Often a powerful machine in a rack, without a screen.
Data centerA secure building full of servers, storage and network equipment, with its own power, cooling and security.
VirtualizationSplitting one physical machine into several isolated "virtual" machines, so many customers can safely share it.
HypervisorThe software (or chip-assisted layer) that does the splitting and keeps the pieces apart.
Virtual machine (VM)A pretend computer, with its own operating system, running on a real one. An EC2 instance is a VM.
ContainerA lightweight package that holds an app and everything it needs. It shares the host's operating system kernel, so it starts in seconds.
Operating system (OS)The base software of a computer (Linux, Windows) that manages hardware and runs programs.
RuntimeThe engine that runs your code: Node.js, Python, the Java Virtual Machine.
MiddlewareSoftware between the OS and your app: web servers (Nginx), app servers, message brokers.
APIA defined way for one program to ask another program to do something. In the cloud, everything is an API call, even "create a server".
ProvisioningGetting a resource ready for use (creating a server, a disk, a network).
Multi-tenancyMany customers ("tenants") share the same physical hardware while staying isolated from each other.
CapexCapital expense: a big upfront purchase you own (buying servers).
OpexOperating expense: a pay-as-you-go cost (a monthly bill for what you used).
Managed serviceA service where the provider handles the boring operations (patching, backups, scaling) for you.
Cloud-nativeDesigned from the start to use cloud strengths: elastic, automated, built from managed services.

More vocabulary (scalability, elasticity, availability, durability, latency, throughput) comes in section 2.10, once you have the picture.

2.1 Life Before the Cloud: One Company and Its Server Room#

To appreciate the cloud, live without it for one minute. Meet StackCafe, the coffee-ordering startup that follows you through this course. It is 2008. Maya, the founder, wants an ordering website for her coffee shops. Here is what she must do.

StepWhat happens in the old worldTime and money
1. Guess the future"How many customers will we have in two years?" Nobody knows, but she must decide now.A guess that is almost always wrong
2. Buy hardwareOrder servers, storage, network switches, a firewall, a backup tape drive. Pay upfront.Thousands of dollars, 4 to 12 weeks of delivery
3. Build a roomA cool room with backup power (a UPS and a generator), air conditioning, locks, fire suppression, and an internet line from two providers for safety.More money, more weeks
4. Install and configureRack the servers, cable them, install the operating system, set up networking.Days to weeks
5. Hire peopleSomeone must patch, monitor, replace failed disks and answer the phone at 3 a.m.Salaries, forever
6. Live with the consequencesToo little capacity on a busy Monday: the site crashes. Too much capacity on a quiet Tuesday: expensive machines sit idle.Lost sales or wasted money, every day

Studies of traditional data centers regularly found that servers ran at only a small fraction of their capacity, because companies had to buy for their busiest moment and then pay for the machines all year. One more problem: if the building floods, loses power or catches fire, the website disappears, because there is only one building.

OLD WORLD (own servers)                          CLOUD WORLD

Guess capacity ---> Buy ---> Wait weeks          Click or call an API ---> Server ready in seconds
Pay upfront for peak                             Pay per second for what you actually use
One building, one point of failure               Many buildings in many places
You hire staff to run it                         The provider runs the building and hardware

The cloud answers each pain point. Let us see how.

2.2 What Cloud Computing Really Is#

Cloud computing is renting IT resources (servers, storage, databases, networks, software, AI models) from a provider over the internet, getting them in minutes, and paying only for what you use.

The US standards body NIST gives the classic definition with five essential traits. If a service lacks these, it is not really "cloud", only hosting with a nicer name.

TraitPlain meaningHow you see it on AWS
On-demand self-serviceYou get resources yourself, instantly, without calling a salespersonClick "Launch instance" or run one CLI command. The server is ready in about a minute
Broad network accessYou reach it over the network from any deviceConsole in a browser, CLI on a laptop, SDK in a program
Resource poolingThe provider shares a huge pool of hardware among many customers (multi-tenancy) and hands out slicesYour EC2 instance sits on a physical host that may also serve other customers, yet is isolated from them
Rapid elasticityCapacity grows and shrinks quickly, often automaticallyAuto Scaling adds servers at 8 a.m. and removes them at noon
Measured serviceUsage is metered, so you pay for what you consumeBilled per second, per request, per GB-month. Cost Explorer shows the details

How a cloud is physically built#

The magic is not magic. It is three layers stacked on top of each other.

 YOU (console, CLI, SDK)
   |  "Please create a server with 2 CPUs and 4 GB"       <- an API call over HTTPS
   v
+--------------------------------------------------------------+
| 3. CONTROL PLANE  (the cloud's brain)                          |
|    checks who you are, finds a free host, creates the VM,      |
|    attaches network + disk, starts the meter                   |
+--------------------------------------------------------------+
| 2. VIRTUALIZATION  (the slicer)                                |
|    One physical server  ->  many isolated virtual machines     |
|                                                                |
|    +------ one physical host in a rack ----------------------+ |
|    |  VM A (you)   VM B (customer X)   VM C (customer Y)     | |
|    |  [ hypervisor / Nitro: keeps them apart ]               | |
|    |  [ real CPUs, memory, disks, network card ]             | |
|    +---------------------------------------------------------+ |
+--------------------------------------------------------------+
| 1. PHYSICAL  (data centers)                                    |
|    Thousands of racks, power, cooling, fibers, guards          |
+--------------------------------------------------------------+
  1. Physical layer. Massive buildings with racks of servers, storage devices and network gear, plus power, cooling and security. You never see them. Chapter 3 goes inside.
  2. Virtualization layer. A hypervisor splits each physical server into many virtual machines. Each VM believes it owns a real computer, but memory and CPU are walled off from the others. This is how one machine serves many customers safely.
  3. Control plane. Software that receives your request, checks your permissions (IAM, Chapter 6), picks a host with room, creates the VM and starts billing. Because creating a server is just software, it takes seconds instead of weeks.

Why renting is cheaper: a provider that buys millions of servers pays lower prices than you could, runs its data centers at high utilization because many customers share them, and spreads the cost of operations over everyone. This is called economies of scale, and it is why AWS can lower prices over time.

Go DeeperWhat actually happens in the 60 seconds after you click Launch Instance
  1. Authentication and authorization. Your request carries a signature. AWS checks who you are and whether your IAM policy allows launching an instance.
  2. Validation. Does your account have quota left? Is the instance type available in this Availability Zone? Is the image (AMI) valid?
  3. Placement. A scheduler picks a physical host with free CPU and memory, in the Availability Zone you chose.
  4. Resource creation. A virtual network interface is attached in your VPC, a virtual disk (EBS volume) is created from the image, and security group rules are applied.
  5. Boot. The VM starts. The operating system boots from the disk, and the instance gets its private IP address.
  6. Billing starts. The meter runs per second while the instance is in the running state.

Steps 1 to 4 are the control plane at work. Your running instance, doing real work, is the data plane. This split matters later: when a provider has an outage in the control plane, running servers often keep working while you cannot create new ones.

Go DeeperVM vs. container vs. microVM: three ways to slice a machine
Virtual machineContainerMicroVM
What is isolatedA full computer with its own OS and kernelA process group that shares the host kernelA tiny VM with a minimal kernel
Start timeTens of secondsA second or lessFractions of a second
Isolation strengthVery strong (hardware-assisted)Good, but a shared kernel is a bigger surfaceVery strong, like a VM
AWS exampleAmazon EC2Amazon ECS and EKSAWS Lambda and Fargate use Firecracker microVMs under the hood

You do not need to run any of these yet. The point: AWS picks the slicing technique that gives each service the right mix of speed and security.

2.3 The Responsibility Ladder: Who Manages What#

Every application is a stack of layers. From the bottom: a building, network cables, hardware, a virtualization layer, an operating system, a runtime, your code, and finally your data and users. The service models are simply different answers to one question: "Up to which layer does the provider look after things for me?"

Layer (top = closest to the user)On-premisesIaaSCaaS (Fargate)PaaSServerless (FaaS)SaaS
Your users, access and dataYOUYOUYOUYOUYOUYOU
Application features and settingsYOUYOUYOUYOUYOUprovider (you only configure)
Your application codeYOUYOUYOU (in a container image)YOUYOU (just a function)provider
Runtime (Node.js, Python, Java)YOUYOUYOU (inside the image)providerproviderprovider
Middleware (web server, orchestrator)YOUYOUprovider (orchestration)providerproviderprovider
Operating systemYOUYOUproviderproviderproviderprovider
VirtualizationYOUproviderproviderproviderproviderprovider
Servers (hardware)YOUproviderproviderproviderproviderprovider
Storage and network hardwareYOUproviderproviderproviderproviderprovider
Data center building, power, coolingYOUproviderproviderproviderproviderprovider

Read the table in columns. In the on-premises column, everything is YOU. Move right and the provider's share grows from the bottom up. In the SaaS column you only manage who may log in and what data you put in.

 YOU MANAGE  ^                                                         |  PROVIDER MANAGES
             |
 On-prem     |  [ app ][ data ][ runtime ][ OS ][ servers ][ network ][ building ]  all yours
 IaaS        |  [ app ][ data ][ runtime ][ OS ] | servers, network, building
 CaaS        |  [ app ][ data ][ container image ] | OS, servers, network, building
 PaaS        |  [ app ][ data ]            | runtime, OS, servers, network, building
 Serverless  |  [ function ][ data ]       | everything underneath, scaling too
 SaaS        |  [ data + users + settings ] | the whole application and underneath

 MORE CONTROL, MORE WORK  <------------------------------>  LESS CONTROL, LESS WORK

The one test that never fails: to place a service on the ladder, ask "Who patches the operating system?" If you do, it is IaaS. If the provider does, and you still deploy your own code, it is PaaS, CaaS or serverless. If you do not deploy any code at all, it is SaaS.

Your data and your access settings are always yours. Even on SaaS, the provider does not decide who in your company may open which file, and does not make your passwords strong. This is the idea behind the shared responsibility model, which Chapter 3 covers for AWS in detail.

The trade-off in one table#

On-prem / IaaSCaaSPaaSServerlessSaaS
Control and flexibilityHighestHighMediumLowerLowest
Operations work for youHighestMediumLowVery lowAlmost none
Time to get startedHours to daysHoursMinutes to hoursMinutesMinutes
Cost patternPay while it runs, even idlePay while tasks runPay while it runsPay per request or per millisecondPer user per month, usually
Risk of lock-inLowLow to mediumMediumMedium to highHigh

2.4 IaaS in Depth: Renting the Raw Materials#

Analogy: renting an empty flat. The landlord gives you walls, plumbing and electricity. You bring the furniture, decide the layout, fix what breaks inside, and keep it clean. You have total freedom, and total responsibility for everything inside the door.

Infrastructure as a Service (IaaS) gives you the basic building blocks of computing as rentable pieces: virtual servers, storage disks, and virtual networks. You choose the operating system and everything above it.

IaaS building blockWhat it isAWS serviceSame idea elsewhere
Virtual serverA computer you can start, stop and resizeAmazon EC2Azure Virtual Machines, Google Compute Engine, DigitalOcean Droplets
Block diskA virtual hard drive attached to a serverAmazon EBSAzure Managed Disks, Google Persistent Disk
Virtual private networkYour own isolated network with IP ranges and firewallsAmazon VPCAzure Virtual Network, Google VPC
Load balancerSpreads traffic over many serversElastic Load BalancingAzure Load Balancer, Google Cloud Load Balancing

What you do on IaaS#

  • Choose the size of the server (CPU, memory) and the operating system (Amazon Linux, Ubuntu, Windows Server).
  • Patch and update the operating system, regularly.
  • Install your runtime and web server, and deploy your code.
  • Set up scaling and backups (the building blocks exist, but you wire them together).
  • Secure it: firewall rules, user accounts, disk encryption, antivirus where needed.

A worked example: StackCafe v1 on IaaS#

Maya launches one EC2 server, installs the web server and the database on it, and points her domain at it. The commands below are only for reading now. You will run real ones in Chapter 15.

# 1. Ask AWS for one small Linux server (the control plane creates a VM)
aws ec2 run-instances \
  --image-id ami-0123456789abcdef0 \
  --instance-type t3.small \
  --count 1

# 2. Log in and install what the app needs (YOUR job on IaaS)
sudo dnf update -y          # patch the operating system
sudo dnf install -y nginx   # install a web server
sudo systemctl enable --now nginx

Notice that AWS gave her the machine, and everything after that first command is her work. If a security patch for Linux appears, she must apply it.

When IaaS is the right rung#

Choose IaaS whenExample
You need full control of the OS or special softwareA licensed application that needs specific kernel settings
You are moving an existing application without changing it ("lift and shift")A company moves its 200 virtual machines from its own data center
The workload is unusualGPUs for training, very large memory machines, custom network appliances
You must run software that no managed service offersA niche database engine

IaaS cost pattern: you pay for a server every second it is running, even when nobody uses it. A forgotten test server keeps billing. Stopping or deleting what you do not need is a habit to build from day one (Chapter 4).

2.5 PaaS in Depth: Bring Code, Not Servers#

Analogy: renting a furnished apartment. The furniture, the heating and the cleaning service are included. You move in with your suitcase (your code) and start living. You cannot knock down walls, but you also never fix a leaking pipe.

Platform as a Service (PaaS) hands you a ready platform to run your application. You upload code. The platform provides the operating system, runtime, web server, patching, load balancing and often auto scaling.

PaaS exampleWhat you give itWhat it does for you
AWS Elastic BeanstalkA zip of your Node.js, Python, Java, .NET, PHP, Ruby or Go appCreates servers, load balancer and scaling, then deploys and monitors your app
AWS App RunnerA container image or a source repositoryBuilds, deploys, scales and gives you an HTTPS URL
Amazon RDS"I want a PostgreSQL database"Installs and patches the engine, takes backups, offers a standby copy for failures
Herokugit pushBuilds and runs the app on managed containers
Google App Engine, Azure App ServiceYour codeThe same idea on other clouds

The honest truth: the lines are blurry#

Industry diagrams make the boundaries look sharp. Real products sit on a spectrum. Amazon RDS is a good example. Is it IaaS or PaaS? You never log in to its operating system, and AWS patches the database engine, so it behaves like PaaS. People often call it a managed service. Do not memorize labels for every service. Use the test from section 2.3: who patches the OS, and what do I deploy?

Running a database two waysMySQL installed on an EC2 server (IaaS)Amazon RDS for MySQL (PaaS-like)
OS patchingYouAWS
Database engine upgradesYouAWS applies them in a maintenance window you choose
BackupsYou write and test the scriptsAutomated backups and point-in-time recovery
A second copy for failuresYou build and operate replicationTick "Multi-AZ" (Chapter 24)
Control over OS and configTotalLimited to what RDS exposes

Rule of thumb: if a managed service meets your needs, use it. The hours you do not spend patching and babysitting are worth more than the extra control you will probably never use.

Trade-offs of PaaS#

  • Constraints: only certain languages or versions, certain ways of storing files, and limits on background processes.
  • Less visibility: when something is slow, you cannot always look inside the machine.
  • Lock-in: moving away may mean changing how your app is packaged. Containers reduce this risk.

2.6 SaaS in Depth: Just Use the Software#

Analogy: a restaurant. You do not shop, cook or wash dishes. You choose from the menu and eat. If the food is not quite how you like it, you can only adjust small things, such as "no onions".

Software as a Service (SaaS) is a complete application you use over the internet, usually in a browser or an app, normally paid per user per month. The provider runs, updates and secures the whole thing.

Everyday SaaSWhat it doesWhat YOU still manage
Gmail, Google WorkspaceEmail, calendar, documentsUser accounts, passwords and MFA, sharing rules, what you store
Microsoft 365Office apps and email in the cloudLicenses, user access, data policies
SalesforceCustomer relationship managementYour customer data, roles, custom fields
Zoom, SlackMeetings and chatWho may join, retention settings
DropboxFile storage and sharingWho can see which folder
GitHubCode hostingRepository access, secrets, branch rules
Amazon Connect (on AWS)A cloud contact center for customer calls and chatsAgents, call flows, customer data
Amazon WorkSpaces (on AWS)Virtual desktops reached from any deviceUsers, images, applications on the desktops

Two ways SaaS matters to an architect#

  1. As a buyer. The cheapest system to run is the one you do not build. If a SaaS product does the job (payroll, email, ticketing), buying it is often the best architecture decision.
  2. As a builder. Later in the course StackCafe may sell its own ordering platform to other coffee shops. That makes StackCafe a SaaS provider, and its design problems change: many customers on one system (multi-tenancy), isolation, per-customer billing (Chapter 45).

SaaS trap: "It is SaaS, so security is the vendor's problem." No. Data leaks from SaaS usually come from customers: a public sharing link, a former employee who still has access, a weak password with no MFA. You own your users and your data.

2.7 Serverless Explained Properly (FaaS, CaaS and More)#

Analogy: the electricity grid. You do not own a power plant, you do not choose a generator size, you plug in and the meter counts kilowatt-hours. When you use nothing, you pay nothing, and when you suddenly need ten times more, the grid just supplies it.

What "serverless" really means#

Servers still exist. You just never see, size, patch or scale them. A service is serverless when it has these four properties:

PropertyMeaning
No server managementNo operating system to patch, no instance to size
Automatic scalingFrom zero to thousands of parallel executions and back, with no setup
Pay for useYou are billed per request, per millisecond or per GB stored, not per hour of an idle server
Built-in availabilityThe service already runs across multiple data centers for you

FaaS: Function as a Service#

FaaS is the compute form of serverless. You write a small function, upload it, and the platform runs it only when an event happens: a file lands in a bucket, a web request arrives, a timer fires. AWS Lambda is the AWS example. You pay for each run, measured in milliseconds.

# A complete Lambda function. This is ALL the "server" code you write.
def handler(event, context):
    name = event.get("name", "friend")
    return {"message": f"Welcome to StackCafe, {name}!"}

The serverless family on AWS#

NeedServerless serviceWhat you do not manage
Run codeAWS Lambda (FaaS)Servers, OS, scaling
Run containersAWS Fargate with ECS or EKS (CaaS)The servers that host the containers
Store filesAmazon S3Disks, capacity, replication
Store recordsAmazon DynamoDBDatabase servers, partitioning
Expose an APIAmazon API GatewayWeb servers, load balancers
Queue and notifyAmazon SQS, SNS, EventBridgeBrokers and their scaling
Orchestrate stepsAWS Step FunctionsThe workflow engine

CaaS: Containers as a Service#

A container packs your app, its libraries and its settings into one portable unit that runs the same everywhere. CaaS means the provider runs the containers for you. With Amazon ECS or EKS on AWS Fargate, you give a container image and say how much CPU and memory it needs. AWS finds the machine and runs it. It sits between PaaS and serverless: more flexible than PaaS (any language, any library), with less operating work than IaaS. Chapters 18 and 19 are fully about this.

Where serverless shines, and where it does not#

ShinesThink twice
Spiky or unpredictable traffic (a flash sale, a daily report)Constant, heavy traffic 24 hours a day, where a fixed server can cost less
Event-driven work (react to an upload, a message, a schedule)Long-running jobs. A Lambda function has a maximum run time of 15 minutes
Small teams with no operations staffSoftware that needs special hardware or full OS access
Paying nothing when nobody is using the appVery low-latency needs where an occasional "cold start" delay is not acceptable without extra tuning

"Serverless means there are no servers." Wrong. There are servers. They are simply not your problem. If an exam or interviewer asks, say: "Serverless means no server management, automatic scaling, pay per use and built-in high availability."

Go DeeperWhere does serverless sit on the ladder? Clearing up the confusion

Some books draw serverless as a separate rung, some fold it into PaaS. Both are fine, because the ladder is a guide, not a law. What matters is the practical difference between the two:

Classic PaaS (Elastic Beanstalk)Serverless (Lambda)
Is something always running?Yes, at least one instanceNo, code runs only when triggered
ScalingScales by adding and removing instances, within minutesScales per request, within seconds, and to zero
You pay while idle?YesNo
Unit you think inAn application and its instancesA function and its events

2.8 Deployment Models: Where the Cloud Lives#

Service models (IaaS, PaaS, SaaS) say what you rent. Deployment models say where it runs and who shares it.

Analogy: getting around a city. You can own a car (private), use taxis and ride apps (public), own a car for daily trips and take taxis for airports (hybrid), or use several ride apps to avoid depending on one (multi-cloud).

ModelWhat it isReal exampleTypical user and reason
Public cloudA provider's shared infrastructure, rented over the internetAWS, Microsoft Azure, Google CloudStartups and most enterprises. Fast start, no hardware, pay as you go
Private cloudCloud-style infrastructure used by one organization only, usually in its own data centerA bank running VMware or OpenStack on its own hardwareOrganizations with strict control rules or large existing investments
Hybrid cloudOn-premises and public cloud connected and used togetherA hospital keeps patient records on-premises and runs analytics on AWS, linked by AWS Direct Connect or VPNCompanies mid-migration, or with data that must stay in the building
Multi-cloudUsing more than one public cloud providerAn app on AWS with analytics in Google BigQueryBest-of-breed services, merger leftovers, vendor-risk policies. Costs extra skills and complexity
Edge cloudCloud capacity placed close to users or machinesAWS Local Zones, AWS Wavelength, AWS Outposts, AWS Snow devicesFactories, games, video, 5G apps that need very low latency
Sovereign cloudA cloud operated under a specific country's or region's legal controlThe AWS European Sovereign Cloud, and AWS GovCloud (US) for US governmentGovernments and regulated industries with legal data and operator-residency rules
Community cloudInfrastructure shared by several organizations with common needsA shared platform for universities or government agenciesRare in practice. Mostly an exam term

A hybrid example you can picture#

 YOUR DATA CENTER (on-premises)                        AWS CLOUD
+------------------------------+   private link    +----------------------------+
|  Old billing system          |<=================>|  New web and mobile app    |
|  Customer database           |  Direct Connect   |  Analytics and AI          |
|  (must stay here by law)     |    or VPN         |  Backup copies             |
+------------------------------+                   +----------------------------+

Do not mix these up: hybrid = your own data center plus a cloud. Multi-cloud = two or more cloud providers. A company can be both. Many exam and interview answers lose points on exactly this.

Go DeeperCloud-native, lift and shift, and why the model you pick changes the bill

There are three common ways an application ends up in the cloud:

  1. Lift and shift (rehost). Move existing servers as they are to IaaS. Fast and low risk, but you keep most of the old operating work, and you often pay more than you need.
  2. Replatform. Change a few parts to use managed services, for example moving the database to RDS. A good balance.
  3. Cloud-native (refactor). Redesign to use serverless, containers and managed services. More effort now, and the lowest operating burden later.

Chapter 44 goes through this in detail as the "7 Rs" of migration.

2.9 The Six Advantages of Cloud Computing#

AWS summarizes the benefits in six points. Learn them. They appear in interviews, in business cases and in the Cloud Practitioner exam.

#AdvantageIn plain wordsStackCafe example
1Trade fixed expense for variable expenseNo big upfront purchase. You pay for what you consumeMaya spends nothing on servers before the first customer arrives
2Benefit from massive economies of scaleMillions of customers share costs, so unit prices are lower than you could get aloneShe rents storage at a price no single coffee chain could build
3Stop guessing capacityScale up and down with real demandNo more buying for the Monday-morning rush
4Increase speed and agilityNew resources in minutes, so experiments are cheapA new test environment takes minutes, not a procurement ticket
5Stop spending money running and maintaining data centersFocus on your product, not on racks and coolingHer team builds the app instead of replacing disks
6Go global in minutesDeploy close to customers on other continents, quicklyOpening in Europe means choosing another Region, not building a new data center

Prove advantage 3 with arithmetic#

Assume (for teaching only) that one server costs $0.10 per hour. StackCafe needs 2 servers most of the day, but 10 servers during a 4-hour morning rush. A month has 30 days.

ApproachServer-hours per monthCost
Own servers: buy for the peak, run 10 all day10 servers × 24 h × 30 days = 7,2007,200 × $0.10 = $720
Cloud: 2 always, plus 8 extra during 4 peak hours2 × 24 × 30 = 1,440, plus 8 × 4 × 30 = 960, total 2,4002,400 × $0.10 = $240
Difference$480 saved per month, about 67 percent

The numbers are invented, but the shape is real: the spikier your traffic, the more elasticity saves. If traffic were flat at 10 servers all day, the cloud would not save anything on this part.

Capex vs. opex in one line: capex means you pay first and use later, and the asset loses value on your books. Opex means you use first and pay later, for exactly what you used. Finance teams like opex for startups because it keeps cash free.

2.10 When the Cloud Is Not the Best Answer, and the Words Every Architect Uses#

The cloud is not always the answer#

A good architect also knows the honest exceptions.

SituationWhy the cloud may not winBetter direction
Very large, perfectly steady workload, running flat out 24/7 for yearsThe elasticity benefit disappears, and owned hardware at high utilization can cost lessCompare with commitments such as Savings Plans, or consider hybrid
Machines on a factory floor need answers in a few millisecondsThe nearest Region is too far awayEdge options: AWS Outposts, Local Zones
Law says data must stay in a country with no AWS RegionYou may not be allowed to host thereHybrid, a local provider, or Outposts
The team has no cloud skills and a deadline next weekThe learning curve and misconfiguration risk are realSaaS, a managed platform, or hire help first

The vocabulary, finally explained once#

WordPlain meaningAnalogy and example
ScalabilityThe ability to handle more load by adding resourcesA restaurant that can add tables. Vertical (scale up) = a bigger server. Horizontal (scale out) = more servers
ElasticityScaling that follows demand automatically, both up and downExtra waiters appear at lunch and go home after. Auto Scaling groups do this
AvailabilityThe percentage of time a system works when you need itA shop open 99.9 percent of the planned hours
High availability (HA)Designed so one failure does not take the service down, maybe with a short blipTwo cashiers: if one leaves, the line moves a bit slower
Fault toleranceThe service keeps working with no interruption when a part failsA plane with several engines
DurabilityThe chance that your stored data is not lostPhotos stored in several vaults. Amazon S3 is designed for 99.999999999 percent (11 nines) durability
LatencyThe delay for one request to get an answer (milliseconds)The time for one letter to arrive
ThroughputHow much work is done per unit of timeHow many letters per hour the post office handles
BandwidthThe maximum data a connection can carry per secondThe width of the road
SLAA written promise from the provider about availability, with a credit if brokenA warranty
RTO and RPORTO: how long you can be down. RPO: how much recent data you can afford to lose"Back in 1 hour" and "lose at most 5 minutes of orders" (Chapter 42)

What the "nines" mean in real downtime#

AvailabilityDowntime per yearDowntime per month (30 days)Feels like
99% ("two nines")3.65 days7.2 hoursHobby project
99.9% ("three nines")8.76 hours43.2 minutesTypical business app
99.99% ("four nines")52.6 minutes4.3 minutesImportant customer-facing system
99.999% ("five nines")5.26 minutes26 secondsCritical systems. Expensive to build

Each extra nine usually costs much more, so ask the business: "What does one hour of downtime cost us?" before promising one.

Scalability is not elasticity. A system is scalable if you can add capacity. It is elastic if capacity follows demand automatically, in both directions. Also, availability is not durability: a service can be down for an hour (low availability) and still never lose a byte (high durability).

2.11 Same App, Five Ways: Hosting the StackCafe Website#

The best way to understand the ladder is to solve one problem with every rung. StackCafe wants an ordering website: customers browse the menu, place orders, and staff see them.

ApproachHow it is builtYou manageScalingCost patternBest when
IaaSTwo EC2 servers with Nginx and the app, MySQL on its own EC2 server, a load balancerOS, web server, runtime, patching, backups, databaseYou configure Auto Scaling yourselfPer hour per server, even idleYou need full control, or you are moving an old app unchanged
CaaSThe app in a container on ECS with Fargate, database on Amazon RDSThe container image and the appAdd or remove tasks by rulePer vCPU and GB per second while tasks runThe team already uses containers
PaaSElastic Beanstalk or App Runner with Amazon RDSThe code and its settingsBuilt inPer running instanceA small team wants to deploy code fast
ServerlessS3 and CloudFront for the page, API Gateway and Lambda for logic, DynamoDB for ordersThe functions and the data modelAutomatic, to zeroPer request and per GBSpiky traffic, tiny team, new product
SaaSBuy an online-ordering product (for example Shopify or Square Online) and configure the menuThe menu, staff users, store settingsThe vendor's problemMonthly fee, and a share per orderSelling coffee matters more than building software

How an architect walks the ladder#

Is there a good product you can just buy?  ---- yes ----> SaaS   (stop here)
          | no
          v
Can the code run as small event-driven functions? --- yes ---> SERVERLESS (Lambda, S3, DynamoDB)
          | no
          v
Does a managed platform support your language and needs? -- yes --> PaaS (App Runner, Beanstalk)
          | no
          v
Is your app already in containers (or easy to put in)?  --- yes --> CaaS (ECS or EKS on Fargate)
          | no
          v
Do you need full OS control, special software or a lift and shift?  --> IaaS (EC2)

Architect Decisions: Which Rung Should You Pick?#

If the requirement says...Lean towardsWhy
"We need email, HR and CRM, and nobody wants to run them"SaaSBuilding commodity software is a waste
"Unpredictable traffic, small team, pay only when used"ServerlessScales to zero, no operations
"Deploy a standard web app quickly, no infrastructure work"PaaSUpload code, platform does the rest
"We use Docker and microservices"CaaSContainers fit, with less operating work than IaaS
"We need root access, a custom kernel or licensed software tied to a server"IaaSOnly IaaS gives full control
"Move 300 existing servers in 3 months with no code change"IaaS (rehost)Fastest and least risky first step
"Data must stay on-premises, but we want cloud analytics"HybridKeep data local, send what is allowed
"Strict control by a national authority"Sovereign cloud or private cloudLegal and operator-residency needs

The architect's ladder rule: buy before build, managed before self-managed, serverless before servers, servers before your own data center. Go down a rung only when a real requirement forces you to, and write down which requirement it was. "We like having control" is not a requirement.

Traps: Mistakes That Cost Marks and Money#

"RDS is IaaS." RDS is a managed database service. If you install MySQL yourself on an EC2 server, that is IaaS plus your own work. If you use RDS, AWS runs the OS and database engine for you.

"The cloud is always cheaper." It is cheaper when you use elasticity and managed services well. A lifted-and-shifted, always-on, oversized fleet can cost more than the old data center. Cost needs design (Chapters 5 and 43).

"Hybrid and multi-cloud are the same thing." Hybrid means on-premises plus cloud. Multi-cloud means more than one cloud provider.

"Serverless is always the best answer." It is the best answer for spiky, event-driven work. For steady heavy loads, long jobs or special hardware, containers or servers can be simpler and cheaper.

Security basics for every model: turn on MFA for every human account, never share passwords, give each person only the access they need, and remember that your data is always your responsibility, whichever rung you pick.

2.12 Hands-on Lab: Classify 20 Real Products#

Time: 20 minutes. Cost: $0. You need only paper, or a notes app. No AWS account is needed yet (Chapter 4 creates it).

Step 1. Place each product on the ladder#

For each product, write On-prem, IaaS, CaaS, PaaS, Serverless or SaaS, then note who patches the operating system.

  1. Gmail
  2. Amazon EC2
  3. AWS Lambda
  4. AWS Elastic Beanstalk
  5. Salesforce
  6. Amazon S3
  7. Amazon RDS
  8. MySQL you installed yourself on an EC2 server
  9. Dropbox
  10. Heroku
  11. Amazon Connect
  12. Amazon ECS with the Fargate launch type
  13. Amazon ECS with the EC2 launch type
  14. Zoom
  15. Amazon DynamoDB
  16. Google Compute Engine
  17. Azure App Service
  18. A server in your office cupboard
  19. Amazon WorkSpaces
  20. GitHub
Show the answers
#ProductRungWho patches the OS?
1GmailSaaSGoogle
2Amazon EC2IaaSYou
3AWS LambdaServerless (FaaS)AWS
4Elastic BeanstalkPaaS (it creates EC2 servers for you and manages the platform, though you can still reach them)AWS manages platform updates
5SalesforceSaaSSalesforce
6Amazon S3Serverless storage (often described as a managed service or IaaS-level storage)AWS
7Amazon RDSPaaS-like managed serviceAWS
8MySQL on EC2IaaS (you run it)You
9DropboxSaaSDropbox
10HerokuPaaSHeroku
11Amazon ConnectSaaSAWS
12ECS on FargateCaaS (serverless containers)AWS
13ECS on EC2CaaS on IaaS: you manage the instances that run the containersYou
14ZoomSaaSZoom
15DynamoDBServerless databaseAWS
16Google Compute EngineIaaSYou
17Azure App ServicePaaSMicrosoft
18Office cupboard serverOn-premisesYou (and the air conditioning, and the power)
19Amazon WorkSpacesDesktop as a service (SaaS-like)AWS manages the service, you manage the desktop images and apps you add
20GitHubSaaSGitHub

If you disagreed on #4, #6 or #19, that is fine. These sit between rungs. What matters is that you gave a reason using "who patches the OS" and "what do I deploy".

Step 2. Draw StackCafe v1 three ways#

Draw three boxes-and-arrows sketches of the ordering website: on IaaS, on serverless, and on SaaS. Under each, list three tasks you must do every month. For IaaS you should list things like "patch the OS", "check backups" and "resize the server". For serverless the list is much shorter. For SaaS it is nearly empty. That difference is the whole point of the chapter.

Step 3. Answer three questions out loud#

  1. Why does Maya's cloud bill fall when traffic is spiky?
  2. Which rung would you choose for a bank's decades-old application that must run unchanged, and why?
  3. What does a SaaS customer still have to secure?
Show answer

1. Because she pays for capacity only while she uses it, instead of for the peak all day. 2. IaaS, as a rehost, because it needs no code change, and later it can be modernized step by step. 3. Their users, passwords and MFA, access rules and the data they put in.

Cleanup: nothing to clean. No AWS resources were created.

Cheat Sheet#

ModelYou bringProvider runsAWS examplesOthers
IaaSOS, runtime, app, dataHardware and virtualizationEC2, EBS, VPCAzure VMs, Google Compute Engine
CaaSContainer image, dataOrchestration, servers (Fargate)ECS, EKS, FargateAzure Container Apps, Google Cloud Run
PaaSCode, dataRuntime, OS, scalingElastic Beanstalk, App Runner, RDSHeroku, App Engine, Azure App Service
Serverless / FaaSFunction code, dataEverything, including scaling to zeroLambda, S3, DynamoDB, API GatewayAzure Functions, Google Cloud Functions
SaaSUsers, data, settingsThe whole applicationAmazon Connect, WorkSpacesGmail, Salesforce, Zoom, Microsoft 365
FIVE CLOUD TRAITS    on-demand self-service | broad network access | resource pooling | rapid elasticity | measured service
SIX ADVANTAGES       variable expense | economies of scale | stop guessing capacity | speed and agility | no data-center chores | global in minutes
DEPLOYMENT MODELS    public | private | hybrid (on-prem + cloud) | multi-cloud (2+ clouds) | edge | sovereign
THE TEST             Who patches the OS?  You -> IaaS   Provider + you deploy code -> PaaS/CaaS/serverless   No code at all -> SaaS
NINES                99.9% = 8.76 h/yr   99.99% = 52.6 min/yr   99.999% = 5.26 min/yr
RULE                 buy > managed > serverless > servers > own data center

Quick Recap#

  • The cloud is renting computing resources over the internet, on demand, and paying for what you use, made possible by virtualization and an API-driven control plane.
  • The five traits: on-demand self-service, broad network access, resource pooling, rapid elasticity, measured service.
  • The ladder from most to least control: on-prem, IaaS, CaaS, PaaS, serverless, SaaS. More provider work means less operating work for you, and less control.
  • The test: who patches the OS, and what do I deploy?
  • Serverless means no server management, automatic scaling, pay per use and built-in HA. Servers still exist.
  • Deployment models: public, private, hybrid (on-prem plus cloud), multi-cloud (several providers), edge, sovereign.
  • Six advantages: variable expense, economies of scale, no guessing capacity, speed, no data-center chores, global reach.
  • Elasticity is automatic scaling up and down. Availability is uptime. Durability is not losing data.
  • Your data and access are always your responsibility.

Practice Section A: Certification-Style Scenarios (10)#

Click Show answer to reveal each answer. Try before you open it. Aim for 9 or more.

Q1. A company wants to run its own custom operating system image and install licensed software that needs root access. Which cloud service model fits best?

A. SaaS
B. PaaS
C. IaaS
D. Serverless (FaaS)

Show answer

C. Only IaaS (for example Amazon EC2) gives control of the operating system. SaaS, PaaS and serverless all hide the OS.

Q2. A startup wants to upload its Python web app and let AWS handle the servers, patching, load balancing and scaling, with no server administration. Which model describes this?

A. IaaS
B. PaaS
C. On-premises
D. Private cloud

Show answer

B. PaaS (for example AWS Elastic Beanstalk or AWS App Runner) runs the platform for you. You deploy only code.

Q3. Employees use a hosted email and calendar service through a web browser. The company manages only user accounts and sharing rules. What is this?

A. IaaS
B. PaaS
C. SaaS
D. Hybrid cloud

Show answer

C. A complete application used over the internet is SaaS. The customer still manages users and data.

Q4. A hospital must keep patient records in its own building, but wants to run analytics in AWS, connected by a dedicated link. Which deployment model is this?

A. Public cloud
B. Multi-cloud
C. Hybrid cloud
D. Community cloud

Show answer

C. On-premises plus public cloud, connected, is hybrid. Multi-cloud would mean two or more cloud providers.

Q5. A retailer's traffic is 10 times higher for four hours each day. Which cloud advantage best matches the ability to pay for peak capacity only during those hours?

A. Go global in minutes
B. Stop guessing capacity
C. Increase data durability
D. Fixed expense

Show answer

B. Elastic capacity removes the need to guess and buy for the peak. It also converts fixed cost into variable cost, but "stop guessing capacity" is the direct match.

Q6. Which statement about serverless computing is correct?

A. There are no physical servers involved
B. You must patch the operating system yourself
C. You do not manage servers, and you pay based on use
D. It can only run for days at a time

Show answer

C. Servers still exist, but AWS manages them, scaling is automatic and billing is per use. Lambda functions run for at most 15 minutes, so D is wrong.

Q7. A system must be unavailable for no more than about 52 minutes per year. Which availability target is that?

A. 99%
B. 99.9%
C. 99.99%
D. 99.999%

Show answer

C. 99.99 percent allows about 52.6 minutes of downtime a year. 99.9 percent allows 8.76 hours, and 99.999 percent about 5.26 minutes.

Q8. A team moves its on-premises database to Amazon RDS. Which responsibility does AWS now take over?

A. Designing the database schema
B. Patching the operating system and database engine
C. Deciding which users can read the data
D. Writing the application queries

Show answer

B. RDS is a managed service, so AWS handles OS and engine patching. Schema, access and queries remain the customer's responsibility.

Q9. Which pair of terms describes the difference between a system that can add capacity and a system that adds and removes capacity automatically as demand changes?

A. Durability and availability
B. Scalability and elasticity
C. Latency and throughput
D. Capex and opex

Show answer

B. Scalability is the ability to grow. Elasticity is automatic growth and shrinkage that follows demand.

Q10. A company already uses AWS and also uses Google Cloud for one analytics service. How is this best described?

A. Hybrid cloud
B. Private cloud
C. Multi-cloud
D. Edge cloud

Show answer

C. Using two or more public cloud providers is multi-cloud. Hybrid means on-premises plus cloud.

Practice Section B: Interview and Solution Design Questions (10)#

There is no single multiple-choice answer. Say your answer out loud first, then open the model answer. Interviewers care about clear reasoning and trade-offs.

I1. Explain cloud computing to a non-technical manager in under a minute.

Show model answer

Instead of buying servers and building a room for them, we rent computing power from a provider such as AWS over the internet. We create what we need in minutes, pay only for what we use, and give it back when we are done. The provider owns the buildings and hardware, so we spend our time on the product. It is like using the electricity grid instead of running our own power plant.

I2. What is the difference between IaaS, PaaS and SaaS? Give one AWS or well-known example of each.

Show model answer

It is about how much the provider manages. IaaS gives raw servers, disks and networks, and I manage the OS and above (Amazon EC2). PaaS gives a platform where I deploy code and the provider manages OS, runtime and scaling (Elastic Beanstalk, Heroku). SaaS is a finished application where I only manage users and data (Gmail, Salesforce). A quick test: who patches the operating system, and what do I deploy?

I3. A team says "we chose serverless because it has no servers." What do you say?

Show model answer

Servers exist, but the provider operates them. What the team gets is no server management, automatic scaling including to zero, pay-per-use billing, and built-in availability across data centers. The trade-offs to mention: execution time limits, possible cold starts, and costs that can rise on steady heavy traffic.

I4. A client wants to move 200 on-premises servers to AWS in three months. Which service model and approach do you suggest, and what do you tell them about the longer term?

Show model answer

Rehost (lift and shift) onto IaaS, because it needs no code change and fits the deadline. I would also tell them that rehosting alone rarely saves money. After the move we pick the highest-value systems to replatform onto managed services (for example databases to RDS) and later refactor selected applications to containers or serverless. Each step is justified by cost, risk or agility.

I5. When would you advise against moving a workload to the public cloud?

Show model answer

When law forbids hosting the data where a Region exists, when machines need single-digit-millisecond latency that no Region or edge option can give, or when a huge, perfectly steady workload runs at very high utilization for years and owned hardware is cheaper. Even then I would consider hybrid options such as AWS Outposts or Local Zones, and I would compare costs honestly rather than assume.

I6. Describe a hybrid architecture and one problem it solves.

Show model answer

A bank keeps its core customer database in its own data center because of regulation, and connects it through AWS Direct Connect (backed up by a VPN) to a VPC where new web and mobile apps and analytics run. It solves the problem of modernizing the customer experience without moving restricted data. The new risks are network dependency and the cost of operating two environments.

I7. Prove with numbers that elasticity can lower cost.

Show model answer

Suppose a server costs $0.10 per hour. Traffic needs 2 servers most of the day and 10 servers for 4 hours. Buying for the peak means 10 servers x 24 h x 30 days = 7,200 server-hours, or $720 a month. Elastic scaling uses 2 x 24 x 30 = 1,440 plus 8 x 4 x 30 = 960, which is 2,400 server-hours, or $240. The saving, $480 a month, comes only because demand is uneven. With flat demand the saving disappears.

I8. What is the difference between availability and durability? Give an example where one is high and the other low.

Show model answer

Availability is the share of time a system can be used. Durability is the likelihood that stored data is never lost. A service can be down for an hour (lower availability) yet keep every byte safe (high durability). Amazon S3 is designed for 11 nines of durability, but a Regional outage could still make objects temporarily unreachable.

I9. You must host a customer-facing ordering site for a three-person startup with spiky traffic. Which rung of the ladder do you pick, and what do you say if they ask "why not just use servers?"

Show model answer

I would start with serverless (S3 and CloudFront for the front end, API Gateway and Lambda for logic, DynamoDB for data), or even a SaaS ordering product if custom features are not needed. A three-person team has no time for patching and capacity planning, spiky traffic suits scale-to-zero billing, and availability across data centers is built in. I would tell them servers remain a fine choice later if traffic becomes steady and heavy, or if they need full OS control.

I10. A colleague says "we use SaaS, so security is the vendor's job." How do you respond?

Show model answer

The vendor secures the application and the infrastructure under it. We still own our users, authentication strength (MFA), access and sharing settings, and the data we put in. Many SaaS incidents come from public links, ex-employees with access, or weak passwords. I would propose single sign-on with MFA, least-privilege roles and regular access reviews.

Next up: Chapter 3. AWS Global Infrastructure: Regions, Availability Zones, and the Network That Joins Them (what is inside a data center, how far apart Availability Zones are, how they and the Regions are connected, and how to choose where to run).