6. Concurrency and Isolation

Both services can run multiple (potentially thousands) executions of the same function simultaneously, each handling one incoming event.

AWS Lambda always reserves a separate instance for a single execution. Each execution has its exclusive pool of memory and CPU cycles. Therefore, the performance is entirely predictable and stable.

Azure Functions allocates multiple concurrent executions to the same virtual node. If one execution is idle waiting for a response from the network, other executions may use resources which would otherwise be wasted. However, resource-hungry executions may fight for the pool of shared resources, harming the overall performance and processing time.

7. Cost

Serverless pricing is based on a pay-per-usage model. Both services have two cost components: pay-per-call and pay-per-GB*seconds. The latter is a metric combining execution time and consumed memory.

Moreover, the price tag for both services is almost exactly the same: $0.20 per million requests and $16 per million GB*seconds ($16.67 for AWS). One million executions running for 100 ms each and consuming 1GB of memory cost less than $2. Since AWS Lambda was the first on the market, I assume Microsoft just copied the numbers.

There are some differences in the details, though:

AWS Lambda charges for full provisioned memory capacity, while Azure Functions measures the actual average memory consumption of executions.

If Azure Function’s executions share the instance, the memory cost isn’t charged multiple times, but shared between executions, which may lead to noticeable reductions.

Both services charge for at least 100 ms and 128MB for each execution. AWS rounds the time up to the nearest 100 ms, while Azure rounds up to 1 ms.

CPU profiles are different for Lambda and Functions, which may lead to different durations for comparable workloads.

I wrote more on how to measure the cost of Azure Functions here.

8. HTTP Integration

AWS Lambda used to require Amazon API Gateway to listen to HTTP traffic, which came at a massive additional cost. Recently, Amazon introduced integration with Elastic Load Balancing, which may be more cost efficient for high-load scenarios. However, the pricing is per hour, so good judgment is required.

Azure Functions comes with HTTP endpoint integration out of the box, and there is no additional cost for this integration.

9. Performance and Scalability

AWS Lambda has been on the market longer than Azure Functions, and has a laser focus on the single-hosting model. Although there are no established industry-wide benchmarks, many claim that AWS Lambda is better for rapid scale-out and handling massive workloads, both for web APIs and queue-based applications. The bootstrapping delay effect—cold starts—are also less significant with Lambda.

Azure Functions has improved significantly in the last year or two, but Microsoft is still playing catch-up.

10. Orchestrations

Serverless functions are nanoservices: small blocks of code doing just one thing. The question of how to build large applications and systems out of those tiny pieces is still open, but some composition patterns already exist.

Both AWS and Azure have dedicated services for workflow orchestration: AWS Step Functions and Azure Logic Apps. Quite often, functions are used as steps in those workflows, allowing them to stay independent but still solve significant tasks.

In addition, Azure Durable Functions is a library that brings workflow orchestration abstractions to code. It comes with several patterns to combine multiple serverless functions into stateful long-running flows. The library handles communication and state management robustly and transparently, while keeping the API surface simple.

So, Which Should You Choose?

AWS Lambda and Azure Functions are similar services, but the devil is in the details—and virtually every angle shows some essential distinctions between the two. My list of ten differences is certainly not exhaustive, and each aspect would need a separate article to cover it in full.

It’s unlikely that your choice will be driven purely by these differences. At the same time, whenever you have to choose one option over the other, or when you switch between providers, it’s crucial to adjust your thinking and practices to match the peculiarities.

In short, choose the option that fits you best!