cloud / serverless
Learn Serverless for Free: Free-Tier Limits for Lambda, Azure Functions, Cloud Run and Workers
Serverless means you deploy functions and pay per call, so the free grants decide how much you can learn at no cost. This page compares them across AWS, Azure, Google Cloud and Cloudflare, works out which limit you hit first, and links the docs worth reading.
Serverless is the cheapest way to learn cloud development, because you pay for executions rather than for a machine sitting idle. It is also where beginners meet their first surprise bill, since the meter runs on calls and memory-time that are hard to estimate by eye. The free grants are the safety margin, and they differ more between providers than the marketing suggests.
Rather than repeat the definition, this page puts the numbers side by side and shows how to calculate what a small project would cost. Every figure below was read from the provider's own documentation in October 2026.
01 · FREE GRANTS COMPARED
What each provider gives you every month
Four platforms cover most of what people learn on. The units are not identical, which is why a direct comparison needs a table. A request or invocation is one call. A GB-second is the memory a function is configured with, in gigabytes, multiplied by how long it runs in seconds.
| Platform | Free grant | Notes |
|---|---|---|
| AWS Lambda | 1 million requests and 400,000 GB-seconds per month | Does not apply to functions using Provisioned Concurrency. After that, $0.20 per million requests and $0.0000166667 per GB-second (US East, x86). |
| Azure Functions, Consumption plan | 1 million executions and 400,000 GB-seconds per month | Microsoft marks this plan legacy and recommends Flex Consumption for new apps. |
| Azure Functions, Flex Consumption plan | 250,000 executions and 100,000 GB-seconds per month | The plan Microsoft recommends for new serverless apps. |
| Google Cloud Run functions | 2 million invocations, 400,000 GB-seconds and 200,000 GHz-seconds per month | Part of the Free Tier, which has no end date. |
| Cloudflare Workers (Free plan) | 100,000 requests per day | Limited to 10 ms of CPU time per HTTP request; exceeding the daily limit returns an error. |
Notice the two different clocks. Lambda, Azure and Google reset monthly, so a spike early in the month can use your allowance for weeks. Cloudflare resets daily, which is gentler for a hobby project but caps a single busy day at 100,000.
02 · WHICH LIMIT HITS FIRST
Work out the cost before you deploy
Take a small API on AWS Lambda, configured with 128 MB (0.125 GB) and averaging 100 ms per call, receiving 3 million requests in a month.
| Step | Math | Result |
|---|---|---|
| Compute used | 3,000,000 x 0.125 GB x 0.1 s | 37,500 GB-s |
| Compute billable | 37,500 is under the 400,000 free | $0.00 |
| Requests billable | (3,000,000 - 1,000,000) / 1,000,000 x $0.20 | $0.40 |
| Total | $0.40 |
At small memory sizes, the request count is the limit you hit, not the compute. Raise the memory to 1,024 MB and the same traffic uses 300,000 GB-seconds, which is still under 400,000 but close. Double the traffic and compute becomes the larger line. That is why the first optimization for a Lambda bill is often a smaller memory setting or a shorter duration, not fewer calls.
03 · A HANDLER YOU CAN RUN
A function in about ten lines, tested locally
A serverless function is just an exported handler that receives an event and returns a response. You can test the logic with plain Node.js before any cloud account exists. Lambda's Node.js runtimes currently listed include nodejs24.x and nodejs22.x, and the Python runtimes include python3.14 and python3.13, so match your local version to one of those.
// handler.mjs - runs as-is on AWS Lambda (Node.js runtime) and locally
export const handler = async (event) => {
const name = event.queryStringParameters?.name ?? 'world';
return {
statusCode: 200,
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ message: `Hello, ${name}` }),
};
};
// local check: node --input-type=module -e "import('./handler.mjs').then(async m => console.log(await m.handler({ queryStringParameters: { name: 'Sam' } })))"Run the one-line check at the bottom and you should see an object with statusCode: 200 and a JSON body. When you deploy, the handler name in the console must match the file and export, which is a common first error.
04 · LIMITS THAT SHAPE DESIGN
What serverless cannot do well
Serverless suits short, bursty work: webhooks, scheduled jobs, image resizing, small APIs. The platform limits explain where it stops being the right tool. Lambda's documentation lists a 15-minute maximum per invocation, memory from 128 MB to 10,240 MB, 6 MB for synchronous request and response payloads, and a default of 1,000 concurrent executions per region. It also warns that new accounts have reduced concurrency and memory quotas that AWS raises with usage.
| Platform | Default | Maximum |
|---|---|---|
| AWS Lambda | Set per function | 15 minutes |
| Azure Functions, Flex Consumption | 30 minutes | No enforced maximum, but an HTTP-triggered function must respond within 230 seconds |
| Azure Functions, Consumption (legacy) | 5 minutes | 10 minutes |
If a job runs for an hour or needs to keep an open connection, you want a container, a queue plus a worker, or a different service. Azure notes that Linux hosting on the Consumption plan is retiring on 30 September 2028, which is a reminder to read plan documentation before building on a legacy option.
05 · TOOLING AND LICENSES
Frameworks, and one license worth knowing
The Serverless Framework is a popular tool for deploying functions to several providers. Its pricing page says version 4 and later is free except for organizations earning over $2 million annually, with paid credits above that. For learning this does not matter. If you plan to use it at work, check with your employer. AWS SAM and the providers' own CLIs are alternatives.
For a conceptual grounding, Martin Fowler's site hosts a long article defining Function as a Service and Backend as a Service and the trade-offs between them.
06 · FREE RESOURCES
Where to read, in order
- What is AWS Lambda? ↗The official starting point, then continue to the first-function tutorial.docs.aws.amazon.com
- AWS Lambda pricing ↗The free tier and rates used in the calculation above.aws.amazon.com
- Lambda quotas ↗Timeouts, memory, payload and concurrency limits in one place.docs.aws.amazon.com
- Azure Functions scale and hosting ↗The comparison of hosting plans, timeouts, cold-start behavior and limits.learn.microsoft.com
- Azure Functions pricing ↗Free grants for Consumption and Flex Consumption.azure.microsoft.com
- What is Cloud Run ↗Google's overview of the platform that also runs functions.docs.cloud.google.com
- Cloudflare Workers limits ↗The Free plan limits, including requests per day and CPU time.developers.cloudflare.com
- Serverless Architectures ↗A long conceptual article on FaaS, BaaS and when each fits.martinfowler.com
- Serverless Framework pricing ↗The license terms and paid tiers for the framework.serverless.com
07 · FAQ
Frequently asked questions
Is serverless computing free?
Within limits. AWS Lambda, Azure Functions and Google Cloud Run functions each give a monthly free grant, and Cloudflare Workers allows 100,000 requests per day on its Free plan. Beyond those limits you pay per call and per memory-time.
What is the AWS Lambda free tier?
One million requests and 400,000 GB-seconds of compute per month, per the Lambda pricing page. After that, US East pricing is $0.20 per million requests and $0.0000166667 per GB-second. It does not apply to functions that use Provisioned Concurrency.
Which serverless platform should a beginner start with?
Pick the cloud you are already learning. Lambda has the most documentation, Cloud Run functions lists 2 million free invocations a month, and Workers has a simple daily limit. The concepts of events, handlers and idempotency transfer between them.
Does serverless mean there are no servers?
No. There are servers, but the provider manages them and you pay for executions rather than for running machines. Your code still has limits such as timeouts, memory and payload sizes.
When should I not use serverless?
Avoid it for long-running jobs, workloads that need a persistent connection, or steady high traffic where a container may cost less. Lambda caps a single invocation at 15 minutes, for example.