Key takeaway
- Serverless computing explained for enterprise teams: how it works, AWS, Azure and Google Cloud options, trade-offs, cold starts and when not to use it.
What is serverless computing and how does it work?
Serverless computing is a cloud model in which the provider runs the servers, patches and scales them, and bills for use, while your team deploys code or containers that respond to requests or events. Servers still exist; you simply do not provision or operate them. The model is often called Function-as-a-Service (FaaS), and it is usually paired with managed backend services (Backend-as-a-Service).
AWS describes Lambda as running code in response to events or API calls without managing servers, with each invocation running independently and scaling horizontally to match demand. For enterprise architects, the decision is less about the label and more about workload fit, cost shape and governance. This guide covers that decision, and links to our deeper posts on AWS, Google Cloud and Azure serverless.
How does serverless compare with IaaS, containers and PaaS?
Each model moves the line of responsibility. The table shows the shift in plain terms.
| Model | You manage | Provider manages | Typical billing shape |
|---|---|---|---|
| IaaS (virtual machines) | Operating system, runtime, scaling, application | Hardware and virtualisation | Capacity you reserve or run |
| Containers (CaaS or Kubernetes) | Images, orchestration, scaling rules | Depends on the managed service chosen | Usually the nodes or instances you run |
| PaaS | Application and its configuration | Operating system and runtime | Plan or instance based |
| Serverless functions | Function code, triggers, permissions | Servers, scaling, patching | Per request and execution time |
Serverless does not replace the others. Many enterprises run functions for event handling and glue, containers for steady services, and virtual machines where they need operating system control. Our post on serverless microservices with Python shows one way to combine them.
What are the main components of a serverless architecture?
Three parts appear in most designs:
- Event sources and an API gateway: HTTP requests, queue messages, file uploads, schedules or database changes that trigger code.
- Functions (FaaS): short units of business logic that run on demand.
- Managed backend services (BaaS): databases, storage, queues and identity that you consume rather than operate.
Triggers fall into two groups. Request-based functions answer a client call and return a response. Event-driven functions react to something that happened, such as a file arriving or a message being queued. Microsoft lists examples for Azure Functions that include blob uploads, message queues, HTTP APIs, database changes and timers, according to its docs.
What do AWS, Azure and Google Cloud offer today?
Product names and plans change, so confirm the current position on each official page before you commit. This is what the documentation says at the time of writing.
| Provider | Function service | Current status and notes (according to each provider's docs) |
|---|---|---|
| AWS | AWS Lambda | Pay-per-use. Documented quotas include a 900-second maximum timeout, 128 MB to 10,240 MB memory, 250 MB unzipped package size, 10 GB container image size and 1,000 concurrent executions per Region by default (adjustable). |
| Azure | Azure Functions | Flex Consumption is the recommended serverless plan for new apps. The older Consumption plan is marked legacy, and Linux Consumption hosting has a documented retirement date of 30 September 2028, so confirm the latest announcement. HTTP-triggered functions must respond within 230 seconds on every plan. |
| Google Cloud | Cloud Run functions and Cloud Run | Documentation uses the name Cloud Run functions and suggests moving functions created with the Cloud Functions v2 API to Cloud Run. Cloud Run services scale to zero by default, with request-based or instance-based billing. |
What are the benefits, and what are the trade-offs?
| Benefit | What it means | Trade-off to plan for |
|---|---|---|
| Less operations work | No server patching or capacity planning for the function layer | You depend on provider limits and runtime support |
| Automatic scaling | Capacity follows demand, including down to zero on many plans | Scaling is bounded by quotas, and downstream databases can become the bottleneck |
| Pay for use | No charge for idle time under request-based billing | Steady high traffic can cost more than always-on capacity |
| Fast delivery | Small units of code ship quickly | Many small functions raise testing, tracing and ownership overhead |
Cold starts are the best-known trade-off: a new instance may need time to start before it serves a request. According to Microsoft, Azure Flex Consumption improves cold starts and offers always-ready instances, and according to Google, Cloud Run supports minimum instances to avoid slow first requests.
When should you use serverless, and when not?
- Good fit: uneven or unpredictable traffic, event processing such as file uploads and queue messages, scheduled tasks, and lightweight APIs.
- Design for it: keep functions stateless and save state in a database or storage service, and reuse connections or use a connection pool for relational databases.
- Poor fit: long-running or compute-heavy jobs beyond platform limits, workloads that need a persistent file system or operating system access, and latency-critical paths that cannot tolerate cold starts without paid warm capacity.
A sensible adoption sequence is to start with one event-driven workload, measure cost and latency against a container baseline, set per-function permissions, and only then widen the pattern. For data pipelines, see our post on serverless architecture for big data and data lakes.
How should enterprises govern serverless and AI agents that call functions?
Functions are increasingly the tools that AI agents call. Each function then becomes an action with business impact, so it needs an owner, the least privilege it requires, logged invocations and a clear limit on what an agent may trigger. ElixirClaw describes itself as an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control, and AgentGRC keeps autonomous agent actions inside policy, with the audit trail risk teams need.
To map one serverless decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.
What should you plan for in 2027?
If you run functions on AWS Lambda, the Lambda runtimes page lists runtime deprecations that fall in 2027.
- 30 May 2027: deprecation date for Node.js 22 (nodejs22.x).
- 30 June 2027: deprecation date for Python 3.11 (python3.11).
- 29 July 2027: Lambda begins blocking creation of new functions on both runtimes, and blocking of updates to existing functions begins on 31 August 2027.
After deprecation, Lambda may no longer apply security updates. Inventory your functions by runtime and schedule upgrades ahead of these dates.
Frequently asked questions
What is serverless computing?
It is a cloud model where the provider runs and scales the servers and you deploy code or containers that respond to requests or events. Servers still exist; you do not manage them.
Is serverless always cheaper than containers?
No. Billing follows use, so it suits spiky or idle-heavy workloads. Steady, high-volume workloads can cost less on always-on capacity, so compare both with your own traffic.
What are cold starts and how do you reduce them?
A cold start is the extra delay when a new instance must start for a request. Azure's Flex Consumption plan offers always-ready instances and Cloud Run supports minimum instances to reduce it, according to their docs.
Which workloads should not run on serverless functions?
Long-running jobs beyond platform time limits, work needing a persistent file system or operating system access, and relational databases that depend on many open connections need care or a different model.
Did Google Cloud Functions change?
Google's documentation now uses the name Cloud Run functions and suggests moving functions to Cloud Run. Confirm the current naming on the official page.
How do you govern AI agents that call serverless functions?
Treat each function as a tool with an owner, a permission scope and logged invocations, and keep agent actions inside policy with an audit trail.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE