Perfsys — AWS Consulting Partner
Serverless computing on AWS visualized as a glowing hexagonal node linking distributed cloud services above the AWS logo
Serverless

Serverless Computing on AWS: What It Costs and Where It Fits

Published on Sep 14, 2026

pattern

You already know what serverless computing is. What you actually need to know is whether it is the right call for the system you are building right now, and what it will cost once real traffic hits it.

That is a different question, and most explainers stop before they answer it. This one does not.

What Is Serverless Computing on AWS?

Serverless computing is a cloud model where AWS runs and scales your code, and you pay only for the compute time you actually use instead of for servers sitting idle. The name is a bit of a misnomer. Servers still run your code. You never provision them. You never patch them. AWS manages them for you.

On AWS, serverless spans compute, data and orchestration. AWS Lambda is the compute layer: a service that runs serverless functions in response to events and scales the underlying infrastructure automatically. Around it sit managed services built the same way, including Amazon API Gateway for exposing APIs, Amazon DynamoDB for single digit millisecond NoSQL storage and AWS Step Functions for coordinating multi step workflows. None of them ask you to size an instance or plan for peak load.

That combination is why serverless computing shows up so often in cost and architecture conversations. It is not one product. It is an operating model that changes who carries the operational weight of your infrastructure, and it changes your AWS bill in ways that are easy to get wrong if you are pricing it from memory.

The Core AWS Services Behind Serverless Computing

Most production serverless systems on AWS lean on the same handful of services. Here is what each one actually does.

Diagram of core AWS serverless computing services: Lambda, API Gateway, Step Functions, DynamoDB, Aurora Serverless and Fargate
Diagram of core AWS serverless computing services: Lambda, API Gateway, Step Functions, DynamoDB, Aurora Serverless and Fargate

AWS Lambda

Runs your serverless functions on demand, in response to an HTTP request, a file upload, a queue message, or a schedule. You configure memory from 128 MB up to 10,240 MB, and AWS handles the scaling from one invocation to thousands running in parallel.

Amazon API Gateway

Sits in front of Lambda for HTTP and REST workloads, handling routing, throttling, authorization and request validation so your functions stay focused on business logic. For a single function that just needs a public HTTPS endpoint, an AWS Lambda URL skips API Gateway entirely, which is worth knowing before you set up infrastructure you may not need.

Amazon DynamoDB

The NoSQL database most serverless architectures pair with Lambda, because both scale the same way. Capacity adjusts automatically and billing follows actual usage rather than provisioned capacity.

AWS Step Functions

Orchestrates multi step processes across Lambda and other AWS services, which matters the moment your workflow needs retries, branching logic, or a defined order of operations instead of one function doing everything.

AWS Fargate

Extends the serverless model to containers. If your workload is already packaged as a Docker image and does not fit Lambda's execution limits, Fargate removes the underlying EC2 management while keeping the container format.

Amazon Aurora Serverless v2

Applies the same pay for what you use principle to a relational database, scaling capacity up and down without you managing instance sizes.

You rarely need all six on day one. Most teams start with Lambda, API Gateway and DynamoDB, then add Step Functions or Fargate once the system outgrows a single function doing everything.

Where Serverless Computing Shows Up in Practice

The pattern repeats across most serverless systems we build:

  • API backends. API Gateway and Lambda handle authentication, validation, and business logic for web and mobile apps without a dedicated application server.
  • Event driven data processing. Lambda reacts to file uploads, queue messages, or database changes to transform, resize, or route data as it arrives.
  • Scheduled and automated workflows. Step Functions coordinates multi stage jobs like report generation or batch processing on a schedule, with retries built in.
  • Real time backends for AI features. Lambda fronts model calls to services like Amazon Bedrock, scaling with request volume instead of running inference infrastructure around the clock.

What This Looks Like in a Real Architecture

Diagrams of serverless architecture tend to look clean. Real systems are messier, and that is where the design decisions actually matter.

Serverless computing architecture diagram showing a request flow through API Gateway, Lambda, DynamoDB and Step Functions
How a request moves through a typical AWS serverless architecture, from the client to API Gateway, Lambda, DynamoDB, and Step Functions for anything with more than one step.

When we built Tibica's serverless cloud marketplace, the system ended up as four applications running across five microservices, on top of 26 AWS services in total. That number surprises people who think serverless means fewer moving parts. It does not mean fewer parts. It means AWS manages the parts you would otherwise have to patch and scale yourself, so your team's attention goes to the business logic instead of the servers underneath it.

The same principle showed up differently for Roligt AB, where we built a serverless VOD platform across three independent applications. Paying for idle server capacity to handle unpredictable video traffic spikes would have been wasteful. Lambda and DynamoDB scaled with actual demand instead, so the team paid for what it used and nothing more.

Serverless Computing Benefits, With Numbers Behind Them

Every list of serverless benefits repeats the same four words: cost efficiency, scalability, reduced overhead, faster development. They are true. They are also vague enough to mean nothing until you attach real numbers to them.

For Tibica, replacing Lambda based GET operations with direct DynamoDB queries through API Gateway cut workflow times by 55%, improved performance by 58%, and reduced Lambda costs by 50%. That came from removing one unnecessary compute layer. No full rebuild required.

For Nogalis, a single tenant SaaS platform running 30 isolated AWS accounts, we built automated serverless observability on top of Lambda, DynamoDB and Athena. The result was close to 10 times faster incident response and more than 100,000 Lambda invocations tracked every month, with zero manual setup required per new customer account.

Those two numbers point at the two benefits that actually matter when you are deciding whether to build this way:

  • Cost tracks usage, not provisioning. You are not paying for a server sized for your busiest hour of the month while it sits mostly idle the rest of the time.
  • Scaling stops being a project. Traffic spikes get absorbed automatically, which matters most for teams too small to run 24/7 on call infrastructure monitoring.

When Serverless Computing Is the Right Fit, and When It Isn't

Serverless computing is not the correct default for every workload. A partner who tells you otherwise is optimizing for the pitch instead of your system.

Serverless computing versus EC2 decision diagram based on bursty or steady traffic patterns
A quick way to decide: bursty, unpredictable traffic favors serverless computing, while steady, high utilization traffic usually favors EC2 or Fargate.

It tends to be the right fit when:

  • Traffic is bursty or unpredictable, so paying for idle EC2 capacity would waste money most of the month.
  • You are building event driven backends, API layers, or data processing pipelines where each unit of work is short and independent.
  • Your team is small and cannot justify the operational overhead of patching and scaling servers around the clock.

It tends to be the wrong fit when:

  • Your workload runs at steady, high utilization all day. At that point, a right sized EC2 instance or Fargate task is usually cheaper than paying Lambda's per invocation premium on constant traffic.
  • You need single digit millisecond latency on every request with zero tolerance for cold starts, and provisioned concurrency would need to run at full scale around the clock anyway.
  • Individual tasks run longer than Lambda's 15 minute execution limit and cannot be broken into smaller steps through Step Functions.

That last constraint is loosening. AWS introduced Lambda Managed Instances in late 2025, letting you run Lambda functions on managed EC2 instances with Lambda's operational simplicity but EC2 style pricing advantages for steady, predictable workloads. It is a useful middle ground for teams that want Lambda's development model without paying the per invocation rate on traffic that never actually varies.

What Serverless Computing Actually Costs on AWS

This is the part most explainers skip, and it is the part that determines whether serverless computing saves you money or quietly costs more than the EC2 instance it replaced.

AWS Lambda pricing has two components: $0.20 per one million requests, plus a duration charge of roughly $0.0000166667 per GB second on x86, which runs about 20% cheaper on Arm based Graviton2. Every AWS account also gets a free tier of one million requests and 400,000 GB seconds of compute per month, and unlike most AWS free tiers, this one never expires.

Here is what that means for an actual workload. Say your API handles 20 million requests a month, each function configured at 512 MB of memory with an average execution time of 200 milliseconds.

Cost component
Compute (GB seconds)
Requests
Total
Calculation
0.5 GB x 0.2s x 20M requests = 2,000,000 GB-s, minus 400,000 free
20M minus 1M free, at $0.20 per million
Monthly cost
~$26.70
~$3.80
~$30.50

That is the compute bill for handling 20 million requests without provisioning a single server, patching an OS, or paying for capacity during the hours nobody is using it. The same workload run on always on EC2 instances sized for peak traffic typically costs several times that, because you are paying for the server around the clock, not just while it is doing work.

The catch is that Lambda's duration charge scales with memory allocation, so an over provisioned function with 3 GB of memory it never uses will cost meaningfully more than the same function tuned to 512 MB. Cost tuning on Lambda is largely memory tuning.

Common Serverless Pitfalls Nobody Mentions in the Pitch

Serverless computing solves real problems. It also introduces a few that do not show up until a system is already in production.

Cold Starts

Cold starts happen when a function has not run recently and AWS needs to initialize a new execution environment before it can process a request. For latency sensitive paths, that adds noticeable delay to exactly the requests where it matters most.

Vendor Lock-in

Vendor lock-in is real, though often overstated. Lambda functions, DynamoDB schemas and Step Functions workflows are AWS specific, so moving them to another provider means rewriting them. A simple redeploy will not work.

Observability Gets Harder, Not Easier

Once a system is broken into dozens of short lived functions instead of one long running process, tracing a single request across all of them without the right tooling turns debugging into archaeology. That is exactly the gap our observability and monitoring service is built to close, and it is the problem we solved for Nogalis by wiring distributed tracing across every function in their pipeline before an incident forced the issue.

None of these are reasons to avoid serverless computing. They are reasons to design for them from the start instead of discovering them during an outage.

How to Move to Serverless Computing Without Guessing

A serverless migration or build succeeds or fails based on decisions made before the first Lambda function gets deployed.

  1. Map what actually needs to be event driven. Not every part of your system benefits from serverless. Identify the components with bursty or unpredictable load first.
  2. Design for observability from day one. Distributed tracing across functions is not optional once you have more than a handful of them talking to each other.
  3. Tune memory before you tune anything else. Lambda cost and performance both move with memory allocation. Get this wrong and you pay for it every single invocation.
  4. Decide where Step Functions replaces custom orchestration code. Manually chaining Lambda invocations with retry logic you wrote yourself is a maintenance burden Step Functions removes.
  5. Plan the CI/CD pipeline alongside the architecture from the start. Serverless deployments still need testing, staged rollouts and rollback plans. We cover that side of the picture in our guide to DevOps on AWS.

This is also where a cloud assessment earns its cost before a rebuild starts. It is far cheaper to find the wrong assumptions on paper than to find them in a production incident three months after launch.

FAQ

It depends on your traffic pattern. For bursty or unpredictable workloads, serverless computing is usually cheaper because you stop paying for idle capacity. For steady, high utilization workloads, a right sized EC2 instance or Fargate task often costs less than paying Lambda's per invocation rate around the clock.

Cloud computing is the broader category that includes any infrastructure rented from a provider like AWS, including EC2 instances you manage yourself. Serverless computing is a specific model within cloud computing where the provider also handles scaling, patching and server management, and billing is based on actual usage rather than provisioned capacity.

No. Servers still run your code. The difference is that AWS manages, patches and scales those servers instead of you provisioning and maintaining them yourself.

Cold start latency on infrequently used functions, a real though often overstated dependency on your cloud provider's specific services and observability that gets harder as a system splits into more independent functions.

Up to 15 minutes per invocation. Longer processes need to be broken into steps orchestrated through AWS Step Functions, or moved to a service like Fargate that is not bound by Lambda's execution limit.

Ready to See What Serverless Computing Would Actually Cost You?
Ready to See What Serverless Computing Would Actually Cost You?

Get a clear read on whether serverless fits your workload before you commit engineering time to it.

Book Discovery Call
Eugene Orlovsky
Eugene Orlovsky

CEO & Founder @ Perfsys | Serverless architect with 10+ years of hands-on experience designing cloud-native architectures on AWS, backed by multiple AWS certifications. His writing bridges deep technical expertise with real-world business strategy, covering topics from AWS best practices to scaling tech-driven organizations.

Explore Our Case Studies

View all Case Studies

AWS Experts, On-Demand

Need to move fast? Our cloud team is ready to scale, secure, and optimize your systems. Get serverless expertise, 24/7 support, and seamless CI/CD pipelines when you need it most.

Please accept cookies to load the booking widget.