AWS Lambda Pricing, Honestly (2026)
AWS Lambda pricing broken down — the request + GB-second model, the free tier, the hidden costs (API Gateway, egress, cold starts), and when serverless bites.
Table of contents6 sections
The Function That Cost Me Nothing, Until It Didn’t
In 2023, when I was building Clickly — my little Bitly clone — I did the thing every engineer does when they discover AWS Lambda. I thought I’d found a cheat code. No servers to babysit. No instance sitting there burning money at 3 AM while nobody used my product. You get charged only when your code runs. For a guy paying ~$90/month with $0 MRR, “pay only when it runs” sounded like heaven.
The redirect service was one Lambda function. A click comes in, look up the short code, fire a 302, log the event. For the first two months it cost me approximately nothing. I’d open the billing console just to admire the zeros. This, I told myself, is how a broke engineer builds.
Then I ran a small growth experiment, a link got shared somewhere, and traffic spiked for a weekend. The function bill was still tiny. The API Gateway bill in front of it was not. That was the day I learned that Lambda’s sticker price and Lambda’s actual bill are two completely different conversations. Let me save you the tuition.
How Lambda Actually Charges You
There are two meters running whenever your function executes. That’s it — two. Everything else in this post is stuff bolted around Lambda, not Lambda itself.
Meter one: requests. Every time your function is invoked, that’s a request. AWS charges $0.20 per one million requests. Read that again. A fifth of a dollar for a million invocations. For a bootstrapper, requests are basically free. You will almost never look at this line and cry.
Meter two: compute, billed in GB-seconds. This is the one that matters. A GB-second is one gigabyte of memory allocated for one second of runtime. You pick how much memory your function gets (128 MB up to 10 GB), and AWS bills $0.0000166667 per GB-second on x86, rounded to the millisecond.
Here’s the part people miss: more memory means a faster CPU. Lambda scales CPU with the memory you allocate, so bumping from 512 MB to 1 GB can halve your runtime — and since you’re billed on memory × time, a function that’s twice as fast at twice the memory costs roughly the same but finishes sooner. Sometimes over-provisioning memory is cheaper. Counterintuitive, and exactly the kind of knob AWS loves.
One easy win: if your runtime supports it, deploy on Graviton (ARM) instead of x86. It runs about 20% cheaper per GB-second and is usually just as fast. Free money for changing one dropdown. Most people never flip it.
So the mental model: requests are a rounding error, compute is the bill, and compute is memory times how long your code takes. Slow functions with fat memory settings are what actually drain the account.
The Free Tier That Never Expires
This is the genuinely great part, and the reason Lambda seduces every solo founder.
The Lambda free tier gives you 1 million requests and 400,000 GB-seconds of compute every single month — and unlike the EC2 free tier that dies after 12 months, this one never expires. It’s permanent. It’s shared across every function in your account.
Do the math on what 400,000 GB-seconds actually buys. If your function runs at 128 MB (0.125 GB), that’s 3.2 million seconds of runtime a month. At a comfortable 512 MB, it’s 800,000 seconds — over 13,000 minutes of compute, free, forever. For a product with a handful of users, or a cron job, or a webhook handler that fires a few thousand times a day, your Lambda bill is legitimately zero and stays zero.
This is why serverless is fantastic at the start. At zero-to-low traffic, Lambda is the cheapest compute on the planet. You pay for nothing because you use almost nothing. If I were shipping a side project tomorrow that just needed to handle sporadic events, I’d reach for it without blinking.
The problem was never the free tier. The problem is everything that happens after you outgrow it — and the stuff AWS quietly attaches to make Lambda useful in the first place.
The Hidden Costs Nobody Screenshots
A raw Lambda function can’t be reached from the internet. It just sits there. To actually call it over HTTP, you bolt something in front, and that something has its own meter. This is where the bill stops matching the pretty “$0.20 per million” number.
API Gateway — the tax on being reachable
The classic front door is API Gateway, and it is not cheap relative to the thing behind it.
- HTTP APIs: $1.00 per million requests (first 300M/month), then $0.90/M.
- REST APIs: $3.50 per million requests — with extra charges for caching on top.
Sit with that. Your Lambda charges $0.20 per million requests. The gateway in front of it charges $1.00 to $3.50 per million. The front door costs 5x to 17x more than the function itself. If you thoughtlessly pick REST APIs (the default a lot of tutorials show), you’re paying $3.50/M to reach a function that costs $0.20/M to run. That was my Clickly weekend in one sentence.
There are cheaper doors — a Lambda Function URL is free, an Application Load Balancer changes the math — but the moment you’re on API Gateway, it’s usually the biggest line on your serverless bill, not Lambda.
Data egress — the tax nobody reads
Anything your function sends out to the internet is billed as data transfer. AWS gives you 100 GB/month free, then charges $0.09 per GB up to 10 TB. If your Lambda returns big JSON payloads, serves files, or proxies media, egress can quietly become your top cost — the same trap that makes S3 and Azure Blob storage secretly expensive. Serving anything heavy through Lambda instead of putting a CDN in front is a rookie tax.
Provisioned concurrency — paying to kill cold starts
Lambda functions go cold when idle. The next call has to spin up a fresh environment — a cold start — and your user eats a few hundred milliseconds to a couple of seconds of lag. The AWS fix is provisioned concurrency: pay to keep N instances warm and waiting.
But warm instances cost money whether or not anyone calls them — $0.0000041667 per GB-second just to sit there, plus a discounted execution rate on top. Congratulations: you’ve reinvented an always-on server, except billed through the most confusing pricing page in tech. If you need things warm 24/7, you’ve quietly left serverless-land and should ask why you’re still here.
CloudWatch — the meter on the meters
Every log line, metric, and trace flows to CloudWatch, which bills for ingestion and storage. A chatty function logging every request racks up a log bill that has genuinely, for real, exceeded people’s compute bill. Nobody budgets for the cost of watching their functions.
The “Cheap Until It Isn’t” Trap
Here’s the scenario that made me swear off serverless as a default. It’s the exact one from my deployment tier list: an uptime monitor.
Say you land 1,000 customers, each watching 20 endpoints every 5 minutes. That’s 20,000 checks every 5 minutes — about 173 million invocations a month. Let’s price it honestly, assuming each check runs 200 ms at 512 MB (0.1 GB-second each):
- Requests: 173M × $0.20/M = ~$35
- Compute: 17.3M GB-s × $0.0000166667 = ~$288
- HTTP API Gateway: 173M × $1.00/M = ~$173
- Egress + CloudWatch: call it $40+ and climbing
That’s north of $530/month, and the gateway alone ($173) dwarfs the request cost. Now here’s the gut-punch: 173M calls a month averages out to about 65 requests per second. A single small always-on box on Railway or Koyeb — one that costs $5 to maybe $20/month, flat — handles 65 req/s without breaking a sweat. Same workload. One-twentieth the price. No API Gateway tax, no per-request meter, no egress surprise.
That’s the trap in one table. Serverless wins at spiky, low, unpredictable traffic. A flat-fee box wins the second your traffic becomes steady and predictable — and it wins by an order of magnitude. The crossover comes way earlier than the AWS marketing implies.
And the truly dangerous part isn’t the price. It’s that Lambda has no ceiling. A flat box maxes out — it gets slow, it drops requests, but the bill stays $20. Lambda just keeps scaling, and keeps billing, silently, all weekend. If a bad deploy loops your function or someone hammers your endpoint, there’s no cap catching you — the same nightmare I’ve written about with Vercel’s serverless bill. Which is why, if you insist on staying on AWS, Cost Explorer and a hard budget alert aren’t optional — they’re the seatbelt.
So When Is Lambda Actually Right?
I’m not anti-Lambda. I’m anti-Lambda-as-a-reflex. It’s a genuinely brilliant tool for the right shape of problem:
- Spiky, event-driven work — a webhook handler, an image thumbnailer, a nightly cron, a queue consumer that fires unpredictably. This is Lambda’s home turf, and it’ll cost you pennies.
- Glue code — reacting to an S3 upload or a database change. Perfect.
- Genuinely bursty traffic where an always-on box would sit idle 90% of the time.
Where it bites is steady, high-volume, always-on traffic — the core API of a growing product. That’s a flat-fee machine’s job. And if serverless still appeals but AWS’s pricing maze doesn’t, Cloudflare Workers is worth a look: $5/month for 10 million requests included, no separate gateway tax, and — the thing AWS can’t say — no egress charges at all.
The honest rule I landed on: prototype on Lambda’s free tier because it’s free. But the day your traffic flattens into a predictable line, price out a boring flat box before your bill quietly laps you.
Lambda’s pricing isn’t a scam — it’s just unforgiving to the naive. Two clean meters, a genuinely generous free tier, and then a ring of add-ons (API Gateway, egress, provisioned concurrency, CloudWatch) that each cost more than the function they surround. Nobody puts those on the pricing page’s hero section. At zero traffic it’s the cheapest thing alive. At scale with no cap, it’s a slot machine that pays out to Amazon. Know exactly where that line sits for your workload, set the alarm before you reach it, and keep a flat-fee box in your back pocket for the day the graph goes up and to the right. If you’re still assembling the whole stack on fumes, the broke solopreneur’s survival guide is the bigger map.
This is the Broken Engineer Guide. I over-engineer everything, fail at business, and share the scars so you spend less than I did. Go build something — just check the meter first.
