Skip to main content
Serverless

Serverless Showdown: AWS Lambda vs Azure Functions vs Cloud Functions

We compare AWS Lambda, Azure Functions, and Google Cloud Functions on pricing, performance, and ecosystem fit, and argue which wins for most teams.

Let's start with a number: the AWS Lambda free tier includes 400,000 GB-seconds of compute per month (AWS Lambda Pricing). That's enough to run a 1 GB function continuously for about 13 days. But free tiers are just the hook. The real question is: when you move past the free tier and into production, which serverless function service should you build on? We've been through this decision more times than we count, and we've got a clear answer for most teams.

The Contenders: AWS Lambda, Azure Functions, and Google Cloud Functions

We're comparing the big three serverless function offerings: AWS Lambda, Azure Functions, and Google Cloud Functions. All three are event-driven, scale automatically, and bill per execution. But they differ in pricing models, memory limits, and how they tie into their parent clouds. If you're already invested in a cloud ecosystem, that often decides it. But if you're choosing fresh, here's how they stack up.

Pricing: The Free Tiers Are Generous, But the Meter Runs

All three offer free tiers that are surprisingly usable. AWS Lambda gives you 1 million requests and 400,000 GB-seconds per month (AWS Lambda Pricing). Azure Functions matches that: 1 million requests and 400,000 GB-seconds monthly free (Azure Functions Pricing). Google Cloud Functions is more generous on requests—2 million invocations per month—but less on compute: 200,000 GHz-seconds and 400,000 GB-seconds (Google Cloud Functions Pricing).

Beyond the free tier, the per-unit costs diverge. AWS Lambda charges $0.20 per million requests and $0.0000166667 per GB-second (AWS Lambda Pricing). Azure Functions doesn't list a public per-GB-second rate, but it rounds memory usage to the nearest 128 MB and has a minimum execution time of 100 ms (Azure Functions Pricing). Google Cloud Functions charges $0.40 per million invocations and $0.0000100 per GHz-second (Google Cloud Functions Pricing).

Let's put real numbers on it. Say you have a function that runs 5 million times a month, averages 256 MB of memory, and takes 200 ms per execution. That's 256 MB * 0.2 seconds = 51.2 GB-seconds per invocation. Multiply by 5 million gives 256,000 GB-seconds. On AWS, that's $0.20 * (5 million - 1 million) = $0.80 for requests, plus $0.0000166667 * 256,000 = $4.27 for compute, total around $5.07. On Google, the compute is billed per GHz-second: 200 ms at 1 GHz equals 0.2 GHz-seconds, times 5 million is 1,000,000 GHz-seconds. Minus the free tier of 200,000 GHz-seconds leaves 800,000, at $0.0000100 per GHz-second gives $8.00, plus requests: $0.40 * (5 million - 2 million) = $1.20, total $9.20. Azure isn't easily comparable because it bills per-second but with a 128 MB rounding, so a 256 MB function counts as 256 MB (since it's a multiple). The per-second price isn't published in our sources, so we can't calculate it exactly. But the pattern is clear: AWS's GB-second pricing is cheaper for memory-heavy functions.

Limits and Flexibility: Memory and Scaling

AWS Lambda lets you allocate memory from 128 MB up to 10,240 MB in 1 MB increments (AWS Lambda Pricing). That's a huge range—you can fine-tune cost and performance. Azure Functions caps out at 1,536 MB, and memory is rounded up to the nearest 128 MB (Azure Functions Pricing). Google Cloud Functions doesn't specify a memory range in our sources, but its per-GHz-second billing suggests a different cost model.

For us, the 10 GB ceiling on Lambda is a game-changer for data-heavy or ML inference workloads. You can run a substantial model in a function without provisioning a container. Azure's 1.5 GB limit forces you to split work or move to containers on Azure Container Apps, which has its own free tier of 180,000 vCPU-seconds per month (Azure Free Account). Google's limit is a question mark, but its GHz-second pricing often makes CPU-bound functions cheaper.

Ecosystem Fit: It's Not Just the Function

Serverless functions don't live in a vacuum. They're triggered by events from the rest of your cloud. AWS Lambda integrates natively with S3, DynamoDB, API Gateway, and dozens of other services. Azure Functions is tightly woven into the Microsoft ecosystem—great if you're on Office 365 or Active Directory. Google Cloud Functions pairs naturally with Google's data analytics stack.

But there's a bigger trend: Kubernetes is eating the world. The CNCF 2025 survey found 82% of container users run Kubernetes in production, and 66% of organizations running generative AI workloads use Kubernetes for inference (CNCF Annual Cloud Native Survey). If you're already running Kubernetes, you might not want a separate serverless platform. That's where AWS Fargate comes in—it's a serverless compute engine for containers that works with ECS or EKS, scaling up to 16 vCPU and 120 GB per task (AWS Fargate). Azure has AKS, and Google has GKE, but Fargate is the most mature serverless container option.

Our Verdict: AWS Lambda Wins for Most, But Consider the Trap

Here's our take: if you're starting fresh and have no existing cloud allegiance, AWS Lambda is the best default. It has the highest memory ceiling, transparent per-GB-second pricing, and the broadest ecosystem integration. The free tier is generous enough for prototyping, and the cost per execution is hard to beat. For example, a 1 GB function running 10 million times at 1 second each would cost $0.20 * 10 million = $2.00 for requests plus $0.0000166667 * 10 million GB-seconds = $166.67, total ~$168.67. On Google, that same workload would be $0.40 * 10 million = $4.00 for invocations plus $0.0000100 per GHz-second * 10 million GHz-seconds = $100, but wait, that's only if the function uses 1 GHz. If it uses 2 GHz, the cost doubles. AWS's billing is simpler and more predictable.

But don't rush in. If you're already a Microsoft shop, Azure Functions is the obvious choice—the integration with Azure Active Directory and Visual Studio is worth the memory limitation. If you're building on Google Cloud's data tools, Cloud Functions will feel more natural. And if you're doing heavy ML inference, you might skip functions altogether and go straight to containers on Fargate or Kubernetes.

Quick tip: Before committing, run a proof-of-concept with your actual workload on all three. The pricing models differ enough that a quick benchmark will save you from surprises.

Comparison Table

CriteriaAWS LambdaAzure FunctionsGoogle Cloud Functions
Free tier (monthly)1M requests, 400K GB-seconds1M requests, 400K GB-seconds2M invocations, 200K GHz-seconds, 400K GB-seconds
Pricing beyond free tier$0.20 per million requests, $0.0000166667 per GB-secondPer-second billing, memory rounded to 128 MB, no public per-unit rate$0.40 per million invocations, $0.0000100 per GHz-second, $0.0000025 per GB-second
Memory limit128 MB to 10,240 MB (1 MB increments)Max 1,536 MBNot specified in sources
EcosystemBroadest AWS integrationMicrosoft-centricGoogle Cloud-native
Best forTeams wanting flexibility and cost controlMicrosoft-centric enterprisesGoogle Cloud users

Which Should You Choose?

In short, we recommend AWS Lambda for most new projects. Its pricing is transparent, its memory limits are generous, and its integration with the broader AWS ecosystem is unmatched. But if you're deeply embedded in Azure or Google Cloud, the cost of switching ecosystems far outweighs any savings. The real lesson is that serverless functions are not commodities—each has quirks that can save or cost you money. Test with your real workload, and don't let a free tier fool you.

Sources

  • AWS Lambda Pricing - https://aws.amazon.com/lambda/pricing/
  • Azure Functions Pricing - https://azure.microsoft.com/en-us/pricing/details/functions/
  • Google Cloud Functions Pricing - https://www.srvrlss.io/provider/google-cloud-functions/
  • CNCF Annual Cloud Native Survey - https://www.cncf.io/announcements/2026/01/20/kubernetes-established-as-the-de-facto-operating-system-for-ai-as-production-use-hits-82-in-2025-cncf-annual-cloud-native-survey/
  • AWS Fargate - https://aws.amazon.com/fargate/

Share this article:

Comments (0)

No comments yet. Be the first to comment!