Introduction

The terms serverless and traditional describe two models for running applications. In the serverless model, the servers are provisioned and managed by the cloud provider, and charges apply only for the compute that is consumed. In the traditional model, servers or containers are run continuously and are managed by the developer or the operations team. A container is a packaged unit that holds an application together with everything it needs to run. This guide compares the two models and explains when each should be chosen.

What is being compared?

In the serverless model on AWS, application logic is placed in functions that are run by AWS Lambda in response to events, and no server is managed by the developer. In the traditional model, the application runs as a continuously operating process on virtual servers, such as Amazon Elastic Compute Cloud instances, known as Amazon EC2, or on containers managed by a service such as Amazon Elastic Container Service, known as Amazon ECS. The essential difference is who manages the servers and how billing is calculated.

Why the choice matters

The model that is chosen affects cost, the way the application scales, the amount of operational work required, and the degree of control over the runtime. A runtime is the environment in which the application executes. A workload that is intermittent may be inexpensive under one model and wasteful under the other, and a workload that runs continuously may show the opposite result. Selecting the appropriate model is therefore an important early decision.

How each model works

In the serverless model, a function remains idle until an event triggers it. When traffic increases, additional copies of the function are run in parallel, and when traffic falls, capacity is released. No charge is incurred while no code is running. A delay known as a cold start may occur when a new environment must be initialized for the first request.

In the traditional model, one or more servers are kept running so that the application is always ready to respond. Scaling is achieved by adding or removing servers, either manually or through automatic scaling rules that the team configures. Because the servers run continuously, they are paid for whether or not they are handling requests, but no cold start occurs, and full control of the operating system and runtime is retained.

Architecture diagram

Serverless model Traditional model Event --> Lambda function Request --> Load balancer (runs only when | triggered, scales v automatically, no Always-on servers or idle cost) containers (EC2, ECS) (scaled by the team, paid while running)

Advantages of serverless

Where traditional is stronger

When to choose each

Best practices

Common mistakes

Further reading in this library

Frequently Asked Questions

Is serverless cheaper than traditional hosting?
It depends on the workload. For intermittent or unpredictable traffic, serverless is often cheaper, because charges apply only while code is running. For high, steady traffic, a traditional server or container can be cheaper.
Can serverless and traditional models be combined?
Yes. Many systems use both. Serverless functions may be used for event-driven or bursty work, while long-running components run on containers or servers.
Is serverless always the better choice?
No. Serverless reduces operational effort and scales automatically, but it imposes limits such as the maximum execution time and cold starts. Continuous workloads that require full control may be better served by a traditional model.
What is a cold start, and does it affect traditional applications?
A cold start is the delay that occurs when a serverless environment must be initialized before the first request is served. Traditional applications that keep servers running do not experience cold starts in the same way.
Does serverless remove all operational work?
No. Servers no longer need to be managed, but monitoring, security, cost control, and application design remain the responsibility of the developer.
AWS Serverless Architecture Handbook cover
Go deeper ยท Book as a Service™
AWS Serverless Architecture Handbook

This article is the summary. The book is the full, continuously updated reference: choosing between models, cost control, scaling, and complete serverless architectures.

View the book