---
title: "serverless"
description: "Serverless is a cloud computing model where the provider automatically provisions, scales, and bills compute on demand — so you run code, queries, and analytics without managing servers or a fixed cluster."
canonical: "https://motherduck.com/glossary/serverless/"
related:
  - title: "Architecture and capabilities | MotherDuck Docs"
    url: "https://motherduck.com/docs/concepts/architecture-and-capabilities/"
  - title: "DuckLake Architecture Deep Dive"
    url: "https://motherduck.com/blog/ducklake-architecture-deep-dive/"
  - title: "Serverless Compute | MotherDuck Docs"
    url: "https://motherduck.com/docs/integrations/serverless-compute/"
gated_asset:
  title: "DuckLake on MotherDuck"
  url: "https://motherduck.com/product/ducklake/"
---

# serverless

> Serverless is a cloud computing model where the provider automatically provisions, scales, and bills compute on demand — so you run code, queries, and analytics without managing servers or a fixed cluster.

[Serverless](https://aws.amazon.com/serverless/) is a cloud computing model in which the cloud provider automatically provisions, scales, and manages the underlying servers, and you pay only for the compute you actually use. Despite the name, servers are still involved — they are simply abstracted away, so you focus on your code and queries instead of capacity planning, patching, and scaling.

## How serverless works
In a serverless architecture, resources are allocated dynamically in response to demand. When a request arrives, the platform spins up compute to handle it; when traffic falls, it scales back down — often to zero, so idle workloads cost nothing. Billing is tied to actual usage (invocations, compute-seconds, or bytes scanned) rather than to provisioned, always-on capacity. The main trade-offs to know about are **cold starts** — a brief delay when capacity spins up from idle — and less control over the runtime environment.

The model appears at several layers of the stack:

- **Functions as a service (FaaS):** event-driven code such as AWS Lambda, Azure Functions, or Google Cloud Functions.
- **Serverless databases and data warehouses:** engines that separate storage from compute and scale query resources on demand.
- **Serverless analytics:** query services billed per query or per byte scanned, with no cluster to size or keep running.

## Serverless databases and analytics
A **serverless database** decouples storage from compute so the query engine can scale independently of the data it stores, spin up on demand, and idle down when unused — removing the need to provision a fixed-size cluster. This matters most for analytical workloads, which are bursty by nature: heavy during business hours and quiet overnight. Paying only for the queries you actually run is far more efficient than keeping a warehouse running around the clock. That is what people mean by a **serverless data warehouse** — you load data and query it, and the platform handles all scaling and provisioning behind the scenes.

## Serverless analytics with DuckDB and MotherDuck
[DuckDB](https://motherduck.com/glossary/duckdb/) is an in-process analytical engine with no server to run at all — it executes queries directly inside your application process, which makes it a natural fit for serverless functions and ephemeral compute. [MotherDuck](https://motherduck.com/) extends DuckDB into a fully serverless cloud data warehouse: storage and compute are separated, compute scales automatically and idles to zero when you are not querying, and you are billed for what you use rather than for an always-on cluster. The result is a serverless analytics experience where you can query gigabytes to terabytes without sizing, patching, or babysitting infrastructure.

<glossary-callout guide="guide-to-bi-in-the-agentic-era-full" />

Serverless is especially well suited to intermittent and event-driven workloads — on-demand analytics, real-time data pipelines, microservices, and rapid prototyping — anywhere steady-state, always-on infrastructure would sit idle most of the time.