What Is Serverless Computing? Definition and Examples
Quick answer
Serverless computing means the cloud provider runs the servers and you pay for resources while your code runs. A plain definition, a function example and an illustrative cost comparison.
Serverless computing is a cloud model where you write and deploy code while a provider runs the servers underneath. Servers still exist, but the provider provisions, scales and maintains them, and you are billed for the resources your code uses while it runs, not for a machine kept switched on.
Key takeaways
- The name is misleading: servers exist, but someone else manages them.
- Billing follows execution. You pay when your code runs, not while it waits.
- It suits short tasks, spiky traffic and event triggers more than long, heavy jobs.
- You write a small function; the provider decides where and when it runs.
On this page:
- What serverless means
- How it works, with an example
- Where it is used in India
- Common mistakes and confusions
- Related terms
- Frequently asked questions
| Term | Who manages the servers | You pay for | Typical unit you deploy |
|---|---|---|---|
| Serverless (functions) | The cloud provider | Resources used while code runs | A function |
| Virtual machine or rented server | You (OS, patches, scaling) | Time the machine is on | A whole machine image |
| Containers you run yourself | You, or your team's platform | The hosts running the containers | A container image |
| PaaS | The platform, with you choosing app size | Usually a running app plan | An application |
What does serverless computing mean?
It means you stop managing servers and only manage code. According to Amazon Web Services (page copyright 2026), it is an application development model where you build and deploy applications on third-party managed server infrastructure, and a cloud provider provisions, scales and maintains the underlying components of that infrastructure.
IBM (updated 20 November 2025) describes it as an application development and execution model in which the servers are managed by a cloud service provider.
How does serverless work, and how is it billed?
You upload a function. When an event arrives, such as an HTTP request or a file upload, the provider runs the function and returns the result. AWS states that you only pay for the CPU, memory and other computing resources required when your code runs, and IBM notes that billing starts when execution starts and ends when it stops.
Here is the shape of a function. It follows the handler pattern used by AWS Lambda, and you do not need to deploy it to understand the idea.
def handler(event, context):
name = event.get("name", "student")
return {"statusCode": 200, "body": f"Hello, {name}"}Illustrative billing comparison (made-up numbers, not real prices). Suppose a small server costs Rs 1,500 a month whether or not anyone visits. Suppose a function platform charges Rs 0.0002 per request for your function. The formula is cost = price per unit x units used.
- Quiet month, 200,000 requests: 200,000 x 0.0002 = Rs 40, against Rs 1,500 for the server.
- Busy month, 10 million requests: 10,000,000 x 0.0002 = Rs 2,000, now above the server.
Pay-per-use wins when load is low or uneven and can lose when load is steady and high. Check the provider's current price page before comparing real costs.
Where is serverless used in India?
It fits workloads that are busy in bursts. Take a college exam-result page, a made-up scenario: it may be heavily used for two days a year and almost idle otherwise. A server sized for the peak sits unused for months, while a function runs only when a student asks for a result.
Checklist: does serverless fit?
- Fits: short tasks, spiky traffic, work triggered by events.
- Think twice: long-running jobs, very strict response-time needs, heavy computing. Providers set resource limits on functions, so read the limits for your platform first.
What are the common mistakes and confusions?
The biggest confusion is believing there are no servers. The second is assuming serverless is always cheaper. As the example above shows, steady heavy traffic can cost more than a fixed server.
People also mix it up with PaaS and containers. With containers you still decide how many hosts run and manage that setup. With PaaS you usually deploy a whole application onto a plan that stays running. With serverless the unit is a function that runs on demand. Our guide on when to use Docker, Kubernetes or serverless compares these choices, and Docker for beginners covers the container side.
Which terms are related to serverless?
Cloud computing is the wider idea. NIST (SP 800-145, September 2011) defines it as a model for on-demand network access to a shared pool of configurable computing resources that can be rapidly provisioned and released with minimal management effort. In serverless, that minimal management goes a step further, because the provider also handles scaling and server upkeep for you.
Related reading: what an API is, since serverless functions are often called through APIs, and the cloud engineer roadmap.
Next step
Write one small handler function locally, then read your cloud provider's pricing page and work out its monthly cost at your expected traffic. To see where this skill sits in a career, read cloud careers across AWS, Azure and Google Cloud.
Frequently asked questions
What is serverless computing in simple words?
It is a way to run code in the cloud without managing the machines. You upload a function, the provider runs it when needed, and you are billed for the resources used while it runs.
Are there really no servers in serverless?
There are servers. The cloud provider provisions, scales and maintains them, so you never set them up or patch them. The word describes what you no longer manage, not the hardware.
How is serverless billed?
You pay for the computing resources your code uses while it runs. IBM notes that billing starts when execution starts and ends when it stops. A function that is not running does not use resources, so it is not billed for them.
What is the difference between serverless and PaaS or containers?
Serverless runs a small function on demand and the provider handles scaling. Containers leave host management to you or your platform team. PaaS usually hosts a whole application on a plan that stays running.
Where do Indian startups or students use serverless?
Typical uses are exam-result pages, form handlers, image processing and scheduled jobs, where traffic comes in bursts. Students also use it to publish small portfolio backends without managing a server.