AWS Lambda Pricing 2026 Guide
Source: Dev.to
Overview
AWS Lambda is the “serverless” gold standard for running code without managing servers. You only pay for what you use, but without understanding the pricing rules your bill can grow surprisingly fast.
The Two Main Costs: Requests and Duration
AWS calculates your bill using two primary factors:
- Requests: Charged for the total number of times your functions start running.
- Duration: Charged for the time your code executes, rounded to the nearest 1 millisecond.
The Free Tier (The Good News)
Every month, AWS gives you 1 million requests and 400,000 GB‑seconds of compute time for free. This free allowance never expires.
The “Cold Start” Cost Shift (New for 2025)
A “cold start” occurs when Lambda must set up a new environment to run your code. As of August 2025, AWS now bills for the initialization (INIT) phase of a cold start. Previously, this setup time was essentially free. The change especially impacts heavy runtimes like Java or C#.
Three Simple Ways to Save (Up to 34%)
Tip 1: Switch to ARM (Graviton2)
Most Lambda functions run on x86 processors by default. Switching to ARM‑based Graviton2 processors can provide up to 34 % better price‑performance and costs roughly 20 % less per millisecond.
Tip 2: “Right‑Size” Your Memory
When you allocate more memory (RAM) to a function, AWS automatically provides more CPU power.
- Too little memory: Code runs slowly, increasing duration charges.
- Too much memory: You may allocate more CPU than the code can use.
Pro Tip: Use tools like AWS Lambda Power Tuning to find the “sweet spot” where speed and cost intersect.
Tip 3: The “Lambda‑Less” Approach
The cheapest Lambda is the one you don’t run. Many AWS services—such as API Gateway, AppSync, and EventBridge Pipes—can interact directly with databases (DynamoDB) or queues (SQS) without a Lambda intermediary, eliminating compute costs and reducing latency.
Final Pro‑Tip: Don’t Spend Money Waiting
For complex, multi‑step workflows that need to “wait,” avoid using Lambda to manage the wait. Use AWS Step Functions instead; you don’t pay for idle time, whereas a Lambda function would bill for every second it spends waiting.