As we discussed in the previous blog on serverless computing, AWS Lambda and Azure Functions are two of the most popular serverless computing tools.
Amazon was the first company to move to serverless computing with AWS Lambda. While Microsoft is one of the latest entrants in this space with Azure Functions.
We will be discussing key differentiating factors between AWS Lambda and Azure Functions with essential parameters. These parameters include pricing, supported languages & platforms, function triggers, and inactivity functions.
7 Differentiating Factors between AWS Lambda and Azure Functions
AWS Lambda and Azure Functions both come with similar pricing structures with free tiers and extended usage.
But the key difference between the two in terms pricing is Microsoft Azure Functions offers flexibility with its Consumption & Premium Plans. You are billed based on resource consumption and execution per second in the Consumption Plan. And in the case of Premium Plan, you are billed as per resource consumption of v-CPUs and GB-s.
AWS Lambda comes with a single pricing method where it bills you based on per-second resource consumption and execution.
AWS Lambda allows easy integration with its services like S3 and Kinesis to enable log analysis and filtering. You can also customize the code with Amazon S3 and Amazon DynamoDB tables. You can reduce power usage, avoid platform variations for many backend services.
While you can integrate with Azure services like Azure Event hubs, Azure Event Grid, and Azure CosmosDB, etc. easily. Though it reduces the power usage and avoids platform variations, it still falls little behind AWS Lambda in these terms.
AWS Lambda works on a simple JSON input/output model, but in the case of Azure Functions, there are triggers and bindings. You can pull or push extra data at the time processing with many input and output bindings.
Bindings provide you greater flexibility, but they come with the cost of complexity for both APIs and configuration.
As per the USENIX Annual Technical Conference academic report 2018, AWS Lambda doesn’t have a major cold start difference for the launch of existing and new instance. The latency between new and existing instances is meager 39 ms. But, it takes a lot of time to launch new and existing instances in the case of Azure Functions. Its latency is observed to be around 3640 ms.
In the case of AWS Lambda, it is possible to predict stability and consistency as it reserves separate memory for each execution, hence it has a unique pool of memory cycles for an individual instance.
But, Microsoft Azure Functions allows multiple concurrent extensions at a single time. This results in hampering overall performance time for resource-hungry instances.
As per the same report, the maximum idle time for AWS Lambda was 27 minutes, while, there was no consistency in the maximum idle time. Maximum idle time is the maximum time for which an instance can stay idle before shutting down.
Earlier, you needed to buy Amazon API Gateway to track HTTP traffic, but now it has introduced an elastic load-balancing for high-load scenarios. But, as it comes with a per-hour pricing model, you need to be an expert to judge the exact use.
Also, AWS works on the concept of layers to distribute libraries, custom runtime for other language support, and dependencies while Azure uses binding extensions that help the users to create new bindings as per the need and bring them into Function Apps.
You can scale to huge numbers with AWS Lambda in a quick time. It is a little difficult to scale Azure Functions at the same time as AWS Lambda.
AWS Lambda is better than Azure Functions for massive workloads. Also, the bootstrap delay effects are less severe in the case of AWS Lambda than Microsoft Azure Functions.
You need to choose max memory allocation between 128 MB to 3 GB for AWS Lambda. The CPU functions and associated running costs vary with the chosen allocations. It runs on Amazon Linux.
While Microsoft Azure Functions allows you to have a single 1.5 GB memory for all the applications with one virtual core. It runs on both Windows and Linux.
What separates Google Cloud from AWS Lambda and Microsoft Azure?
Google Cloud offers a costlier model than AWS Lambda and Microsoft Azure. Though it comes with the same free tier plan, its paid package costs you $0.4 per million requests.
But what differentiates Google Cloud from AWS Lambda and Microsoft Azure Functions is its high availability & scalability.
AWS Lambda was the first one to market with serverless computing, and even though most of its functionalities being better than its competitors, Microsoft Azure Functions and Google Cloud aren’t lagging by much. They will catch up with AWS Lambda in the upcoming time.