Introduction Serverless computing has revolutionized the way applications are built and deployed, providing developers with the ability to focus on code without managing underlying infrastructure. In this article, we will explore the three major serverless platforms - AWS Lambda, Azure Functions, and Google Cloud Functions - and highlight their key features and functionality.
AWS Lambda, Google Cloud Functions and Azure Functions are all event-driven computing services offered by major cloud providers that allow you to run code without having to provision and manage servers. Here's a comparison of the three services on different aspects.
AWS Lambda is a serverless computing service provided by Amazon Web Services (AWS). It offers several essential features:
Azure Functions is Microsoft's serverless computing offering within the Azure cloud platform. It provides the following key features:
Google Cloud Functions is Google's serverless computing service that allows developers to build and run applications. It offers the following key features:
Lambda can be used to process uploaded files, perform transformations, and store results in a database or cloud storage. b. Event-driven data processing: Lambda can process events from various sources like AWS S3, DynamoDB, or IoT devices, allowing real-time data analysis and insights. c. Web application backends: Lambda can serve as the backend for web and mobile applications, executing business logic, and interacting with databases and APIs
Azure Functions can be used to build serverless chatbot applications, handling user interactions and integrating with messaging platforms or AI services. b. IoT event processing: Azure Functions can process events generated by IoT devices, allowing real-time monitoring, data analysis, and triggering appropriate actions. c. Serverless webhooks: Azure Functions can serve as webhook endpoints, integrating with external services to handle events and trigger actions in response.
Typical use cases and examples: a. Serverless data processing: Google Cloud Functions can be used to process and transform data in real-time, integrating with services like Pub/Sub for event-driven data processing. b. Mobile and web backends: Cloud Functions can serve as serverless backends for mobile and web applications, handling authentication, database interactions, and business logic. c. Real-time data analysis: Cloud Functions can process streaming data, allowing real-time analysis, monitoring, and triggering alerts or notifications.
The cost of using AWS Lambda, Google Cloud Functions, and Azure Functions can vary depending on several factors, such as the number of invocations, the duration of each execution, the memory allocation, and the number of executions. Here's a high-level comparison of the pricing models for each service (Assuming Region Asia Pacific)
Pricing Model |
AWS Lambda |
Google Cloud Functions |
Azure Functions |
Price per Request |
Free for first 1M requests, then $0.20 per 1M requests |
First 2M requests per month are free, then $0.40 per 1M requests |
First 1M requests per month are free, then $0.20 per 1M requests |
Price per GB- Second |
$0.00001667 per GB-second |
$0.0000025 per GB-second |
$0.000016 per GB-second |
Free Tier |
1M free requests per month and 400,000 GB-seconds of compute time per month |
2M free requests per month and 400,000 GB-seconds of compute time per month |
1M free requests per month and 400,000 GB-seconds of compute time per month |
We can estimate the expenses by using our actual request patterns for the three service providers in the following situation:
Scenario 1: Request pattern for well-established companies such as Clappia.
Average Lambda Requests: 49.8 M per month
Average Allocated memory: 128MB per Invocation
Average Execution Time: 500ms per Invocation
Cost (in USD) |
AWS Lambda |
Google Cloud Functions |
Azure Functions |
Invocations |
$9.76 |
$19.12 |
$9.80 |
CPU Utilization |
$45.22 |
$66.92 |
$43.40 |
Others |
nil |
|
nil |
Total (in USD) |
$54.98 / month |
$97.45 / month |
$53.20 / month |
Scenario 2: Some early age Startups ( Hooli, Aviato etc 🙂)
Average Lambda Requests: 2M per month
Average Allocated memory: 128MB per Invocation
Average Execution Time: 500ms / per Invocation
Cost (in USD) |
AWS Lambda |
Google Cloud Functions |
Azure Functions |
Invocations |
$0.20 |
$0.0 |
$0.20 |
CPU Utilization |
$0.0 |
$0.0 |
$0.0 |
Others |
nil |
|
nil |
Total (in USD) |
$0.20 / month |
$1.92 / month |
$0.20 / month |
It is crucial to keep in mind that the costs outlined above are general approximations, and the actual expenses incurred will vary depending on the specific usage patterns of each service.
Language |
AWS Lambda |
Google Cloud Functions |
Azure Functions |
C# |
Yes |
Yes |
Yes |
Java |
Yes |
Yes |
Yes |
Python |
Yes |
Yes |
Yes |
Go |
Yes |
Yes |
Yes |
Node.js |
Yes |
Yes |
Yes |
Ruby |
Yes |
No |
No |
PHP |
Yes |
No |
Yes |
PowerShell |
Yes |
No |
Yes |
Custom Runtime |
Yes |
Yes |
Yes |
AWS Lambda, Google Cloud Functions, and Azure Functions can all automatically scale to meet the demands of incoming requests. However, the exact scale capabilities may vary between services.
Scaling Capability |
AWS Lambda |
Google Cloud Functions |
Azure Functions |
Scaling Type |
Automatic |
Automatic |
Automatic |
Scaling Limit |
No limit, can request limit increase |
2nd gen Cloud Functions have a default limit of 100 for both HTTP and event-driven functions. 1st gen Cloud Functions have a default limit of 3000 for event-driven functions, but there is no default limit for 1st gen HTTP Cloud Functions. |
Up to 200 instances per function per region |
Scaling Speed |
MilliSeconds |
Seconds |
Seconds |
Scaling Granularity |
Per function or per account |
Per function |
Per function |
Scaling Policy |
Concurrent executions |
Request per second |
Request per instance |
Warm Start |
Supported |
Supported |
Supported |
Capability |
AWS Lambda |
Google Cloud Functions |
Azure Functions |
API Gateway Integration |
Yes |
Yes |
Yes |
Compute Platform |
AWS Elastic Container Service, AWS Elastic Kubernetes Service, Amazon EC2, |
Google Kubernetes Engine, Compute Engine |
Azure Kubernetes Service, Azure Container Instances |
Messaging Service |
Amazon Simple Notification Service, Amazon Simple Queue Service |
Cloud Pub/Sub, Firebase Cloud Messaging |
Azure Service Bus, Azure Event Hubs |
Database Integration |
Amazon RDS, Amazon DynamoDB, |
Cloud SQL, Cloud Spanner |
Azure Cosmos DB, Azure SQL Database |
DevOps Integration |
AWS CodePipeline, AWS CodeCommit |
Cloud Build, Cloud Source Repositories |
Azure DevOps, Azure Repos |
Event Trigger Sources |
Lambda can be integrated with over 140 AWS services directly or through the Amazon EventBridge event bus. The commonly utilized event sources for Lambda are:
|
Cloud Functions (2nd gen) offers support for various triggers, which includes:
HTTP triggers Event triggers, such as: Pub/Sub triggers Cloud Storage triggers Generalized Eventarc triggers Any event type supported by Eventarc, including 90+ event sources via Cloud Audit Logs. |
Over 20 sources including Event Grid, Blob Storage, and more |
Service |
AWS Lambda |
Google Cloud Functions |
Azure Functions |
Max Execution Duration |
900 sec or 15 mins |
540 sec or 9 mins |
600 sec or 10mins |
Max Memory |
10GB |
8GB |
3.5GB |
Max Concurrent Executions |
1000 |
1000 |
Varies by plan |
Note: the maximum concurrent executions on AWS Lambda and Google Cloud Functions are the default limits, which can be increased by contacting the provider's support team.
After comparing the three services, AWS Lambda is the preferred choice for us. The cost of using AWS Lambda is significantly lower than the other two providers, especially for established companies that have high request patterns. Additionally, AWS Lambda supports a wide range of programming languages and has practically no limits on scaling. AWS Lambda also offers extensive integrations with other AWS services, making it a highly versatile service for developers. While Google Cloud Functions and Azure Functions also have their unique strengths, AWS Lambda is the most cost-effective and versatile option for event-driven computing.
140L, 5th Main Rd, Sector 6, HSR Layout, Bengaluru, Karnataka 560102, India
+91 96418 61031
3500 S DuPont Hwy, Dover,
Kent 19901, Delaware, USA
+1 (341) 209-1116
3500 S DuPont Hwy, Dover,
Kent 19901, Delaware, USA
+1 (341) 209-1116
140L, 5th Main Rd, Sector 6, HSR Layout, Bengaluru, Karnataka 560102, India
+91 96418 61031