Understanding Serverless Computing
Serverless and Cloud Functions ⚡
So far you've met two ways of running an application: a virtual machine, which is a software-based computer you size, patch, and keep running, and a container, which packages your application and shares an operating system with other containers. Both have something in common. Something is always running, and you are always paying for it. Serverless is what happens when you remove that assumption entirely.
In this lesson, you will learn to:
- Explain what serverless computing and cloud functions do, including who manages the infrastructure.
- Identify event-driven workloads that fit cloud functions and workloads that do not.
- Describe scale-to-zero, per-execution pricing, and cold-start trade-offs.
What Serverless Actually Means 🧠
Serverless computing is a slightly misleading name. Servers absolutely still exist, and your code still runs on real machines in a real data center. What changes is who thinks about them. With serverless, the provider owns the machines, decides how many are needed, patches them, replaces them when they fail, and hands you back a much smaller job: write the piece of code and say what should set it off.
That piece of code is called a cloud function. It is small, it does one thing, and it sits dormant until something triggers it. A trigger might be a file landing in storage, a message arriving, a clock reaching 2 a.m., or a request hitting a web address. When the trigger fires, the provider finds a machine, runs your code, returns the result, and tears everything down again. You are billed for the moments it actually ran, usually measured in fractions of a second, plus the number of times it was invoked.

Every major provider offers this. On Amazon Web Services it is AWS Lambda, on Microsoft Azure it is Azure Functions, and on Google Cloud it is Cloud Run Functions. The names differ; the shape of the idea does not.
Here is how that distinction might sound when Jessica, a product colleague, presses Natalie, a cloud advisor, on where the money actually goes.
- Jessica: If it's called serverless, where does my code actually run?
- Natalie: On servers. The provider's servers. You just never see them, name them, or log into them.
- Jessica: So what am I paying for, if there's no machine sitting there?
- Natalie: Executions. Each time the function fires and for how long it ran. Nothing fires, nothing is billed.
- Jessica: That feels backwards after months of paying for a machine that's idle half the night.
Notice that Natalie does not defend the word "serverless." She redefines it around the only thing that matters to the person asking: who manages the machine, and what shows up on the bill.
