FROMDEV

Serverless Providers: Microsoft Azure Functions vs. AWS Lambda

 Serverless Providers: Microsoft Azure Functions vs. AWS Lambda

Serverless computing, also known as Functions-as-a-Service (FaaS), is a type of cloud computing that allows application developers to focus their attention on building their applications by providing them with third-party services for managing all server-side operations based on the type and amount of functions they use.

The serverless platform can handle all aspects of running, scaling and deployment of the code while also arranging, maintaining and scaling the servers. Since the FaaS handles these technical aspects of development, developers can focus more of their efforts into writing functions—small pieces of code that are triggered by specific events—for the application. You only pay for the functions you use, which means that you do not have to worry about excessive costs for features you aren’t using. Thus, if you use serverless computing for developing your application, you can reduce the resources and costs of your cloud services.

The list of things you can accomplish with serverless computing is rapidly growing and includes working with the Internet of Things (IoT) devices, processing data and building microservices and APIs. In addition, you do not have to choose one serverless provider. In fact, by working with different providers at once, you can avoid downtime in case that provider goes down or a vendor-lock in the scenario.

In this guide, I will compare two of the biggest serverless providers- Microsoft Azure Functions and AWS Lambda in terms of languages supported, platforms, dependencies, triggers, and pricing. My goal is that after reading this guide, you will be able to choose which is the right provider and approach for your organization’s serverless computing needs.

Microsoft Azure Functions

Azure Functions is a serverless computing service by Microsoft hosted on their Azure Public Cloud. Like all serverless computing services, it is designed to simplify and accelerate the process of application development.

Supported Languages

Azure Functions supports a variety of native coding languages including Python, C#, Node.js, and Javascript. Additionally, Azure Functions supports PHP and F#. To offer maximum compatibility with the rest of the architecture of your application, you should select a language that is supported by all the other platforms you are using. By doing so, you can reduce the amount of work and time it might take to port your code between the various FaaS providers you are using.

Supported Platforms

Since Azure Functions is developed by Microsoft, it runs on windows. Azure Functions supports NPM and NuGet pack managers, which allows you to pick the library you prefer to work with. It is easy to recommend Azure Functions to developers who already service Azure on the services suite as it integrates with services including Azure Event Hubs, Azure Event Grid, Azure Cosmos DB, and Azure Notification Hubs. In addition, Azure functions also integrate with a variety of third-party Software as a Service (SaaS) services including Github, Team Services and Bitbucket.

Supported Function Triggers

The approach of Azure Functions to triggers is event-driven. Azure Functions allows you to set dynamic triggers that you can configure and use to launch functions on their respective platforms. You can set these functions based on a web API or set them to trigger on a schedule. If you use other Microsoft services such as Azure Event Hubs or Azure Storage, you can also set triggers based on actions performed on their services.

Pricing


Microsoft allows you to choose between three different Azure Functions subscription plans:
  • Consumption Plan—the total cost of this plan is based on the number of triggers and execution time. In this plan, you only pay for the time you run your code and are relieved from paying for resource management. Microsoft grants free million requests and resource consumption of 400,000GB free per month to users who subscribe to the monthly consumption plan in a pay-as-you-go subscription.
  • Premium Plan—this plan is intended for heavier users. According to Azure’s pricing page, it provides “enhanced performance and is billed on a per-second basis based on the number of vCPU-s and GB-s your Premium Functions consume”.
  • App Service Plan—if you already use an app service plan, you can use it to run Azure Functions for no additional fees.

AWS Lambda

Amazon Web Services (AWS) Lambda is Amazon’s offering of serverless computing service. With AWS Lambda, you can run code without managing resources and servers. With AWS Lambda, your code is automatically executed and dynamically scales according to your needs.

AWS Lambda allows you to run your code for all types of devices including virtual environments and physical end-devices. AWS Lambda uses a highly available computing infrastructure to perform all resource management and computing services such as operating system and server maintenance, provision of capacity, code logging, monitoring, and dynamic automated scaling. 

Supported Languages

Lambda supports a host of languages including Python, JavaScript, C#, and Node.js and Amazon is actively working to expand this list. AWS Lambda allows you to use any code and supports all native and non-native third-party libraries.

Supported Platforms

AWS Lambda services integrate with other AWS cloud services such as EBS, EC2, Kinesis, S3 and more. You can add custom logic to all AWS Lambda resources including S3 buckets and DynamoDB tables, which allows for computation to be applied to the that enters or migrates to the cloud.

Supported Lambda Functions

AWS Lambda supports multiple functions that you can manage through the AWS Step Functions, which you can use to coordinate between various AWS services simultaneously to quickly construct and update serverless workflows. In addition, you can define workflows that trigger various Lambda functions such as branching, parallel, sequential, bracing and error-handling steps. Lambda can also be used to automated changes to EBS volumes.


Pricing

Like with Azure Functions, you only pay for the services you use and Amazon doesn’t charge you when your code is not running. Like Azure Functions, AWS Lambda offers free million requests and 400,000GB-seconds compute time for free each month. After that, every one million requests cost $0.20.

Conclusion

Microsoft Azure Functions and AWS Lambda are both leaders of the serverless computing industry. I hope this guide has helped you understand what each of these services is offering, so you can choose the right service for your needs.

Exit mobile version