What is serverless? Serverless computing in plain terms

What is serverless? It's a way of running software in the cloud where the provider sets up, runs and scales the servers for you, so you only deploy your code. You're typically billed for the resources your code uses while it runs instead of for servers that sit idle.

Last updated November 2, 2026

Dark title card reading "What is serverless?" under the label Cloud Guide

The short version

  • Serverless doesn't mean there are no servers. It means the cloud provider manages them and you never see or configure them.
  • Code usually runs in response to an event, such as a web request, a file upload or a scheduled timer.
  • Serverless services scale up with demand and can scale down to zero when nothing is happening.
  • Well-known examples include AWS Lambda, Azure Functions, Google Cloud Run and Cloudflare Workers.
  • The trade-offs include cold starts, time limits on each run and code that's harder to move to another provider.

What does serverless mean?

Google Cloud defines serverless computing as "a cloud computing execution model that allocates machine resources on an as-used basis." In practice, you write and ship the app and the cloud company takes care of setting up, running and growing the machines behind it. Microsoft's definition is shorter: a cloud execution model "that removes the need to manage servers."

The name is a little misleading. Servers still run your code. Google says serverless "doesn't eliminate servers" but takes the routine infrastructure chores off your plate, so the hardware stays out of sight. In Google's words, "you pay for the server's service, not the server itself."

Serverless is one way to use the cloud, alongside renting virtual machines or running your own containers. If you're new to those terms, our guide to what cloud computing is covers the basics first.

How serverless computing works

In a traditional setup, you rent or buy a server, install an operating system and runtime, deploy your app and keep the machine running around the clock. You decide how many servers you need and add more before a traffic spike.

Serverless works differently. Microsoft describes it as event-driven: you don't set up or maintain any servers, and your code runs when something triggers it. A typical flow looks like this:

  1. You write a small piece of code. On AWS Lambda, that's a handler function. On Google Cloud Run, it can be a function or a container.
  2. You connect it to a trigger. AWS lists triggers such as Amazon API Gateway, Amazon S3, Amazon SQS and EventBridge, and says Lambda works with more than 200 AWS services as triggers.
  3. The provider runs it when the event happens. It finds capacity, starts an environment, runs your code and returns the result.
  4. It scales with demand. More requests mean more copies of your code running in parallel. Google says a Cloud Run service "can rapidly scale out to one thousand instances," or more with a quota increase.
  5. It scales back down. When requests stop, Cloud Run removes even the last idle instance. Google says this is "commonly referred to as scale to zero."

Google compares it to tap water. You could dig and maintain your own well, or connect to the city supply, turn on the tap and pay for the water you use. With serverless, the provider runs the plumbing.

Serverless vs PaaS, containers and VMs

Platform as a service (PaaS) and infrastructure as a service (IaaS) also give you computing power on demand. The difference, according to Google, is that with those models the resources assigned to you stay active even when you aren't using them, and it's your job to scale capacity up or down. Serverless is event-driven, so resources are handed out only when something sets your code off.

Google Cloud compares the models like this:

ServerlessPaaSContainersVirtual machines
Admin workMinimalMediumMedium to highHigh
Cost modelPay per usePay per instancePay per containerPay per VM
MaintenanceNoneLowMediumHigh
ScalingAutomatic and instantManual or auto-scalingManual or auto-scalingManual or auto-scaling
StateTypically statelessStateful or statelessStateful or statelessStateful or stateless

"Stateless" means your code can't count on remembering anything from the last run. For Lambda's Event Functions, AWS says each invocation "runs independently with no shared state." Anything you need to keep, such as user data, goes into a database or storage service.

Serverless and containers also overlap. Cloud Run runs containers, and AWS Fargate, which AWS calls "a serverless compute engine," runs containers for Amazon ECS and Amazon EKS.

Examples of serverless services

AWS, Microsoft Azure and Google Cloud all have serverless products, and the label now covers more than code. Some common examples:

What serverless is used for

Serverless suits work that comes in bursts or reacts to something happening. Microsoft and Google list scenarios such as these:

Advantages of serverless

Disadvantages of serverless

Google's own explainer says serverless "is not yet suitable to meet all potential use cases." The main drawbacks:

Providers offer ways around some of this. AWS sells Provisioned Concurrency, which keeps initialized Lambda environments ready ahead of requests, and Cloud Run lets you set a minimum number of instances so a service never scales to zero.

Is serverless cheaper?

It can be, but it depends on the workload. Serverless pricing usually combines the number of requests with how long your code runs and how much memory it uses. AWS prices Lambda Event Functions on requests and duration in GB-seconds, and Cloud Run charges for CPU and memory in 100ms slices. If a service isn't used and has no minimum instances, Google says you're not charged.

Microsoft says pay-per-execution pricing makes serverless more cost-effective "particularly for variable or unpredictable workloads," because you pay for executions and compute time instead of server capacity reserved in advance. Prices vary by provider, region and settings and change often, so use each provider's pricing calculator.

Frequently asked questions

What is serverless in AWS?

AWS uses the term serverless for services you can run without managing servers, which it says offer automatic scaling, built-in high availability and pay-for-use billing. AWS Lambda, its serverless compute service, is called serverless because you never provision or manage a server to use it: AWS runs your code on infrastructure it maintains, scales and patches. Other AWS serverless services include AWS Fargate for containers, Amazon API Gateway for APIs and AWS Step Functions for workflows.

What is the difference between serverless and cloud computing?

Serverless is a type of cloud computing, not an alternative to it. Microsoft groups cloud services into 4 broad categories: IaaS, PaaS, serverless and SaaS. With IaaS you manage virtual servers yourself, while with serverless the provider manages everything below your code.

What is serverless in Databricks?

Databricks uses the term for compute it manages on your behalf. You can run notebooks, workflows and Lakeflow pipelines on machines Databricks runs, rather than setting up compute in your own cloud account. Databricks says jobs start and scale faster and less capacity sits idle.

Is serverless free?

Not entirely, though AWS and Google offer free allowances. At the time of writing, AWS says the Lambda free tier includes 1 million requests and 400,000 GB-seconds per month, and Google says Cloud Run has a free tier. Usage above the free amounts is billed.

More in Cloud

Sources