Exploring About Azure Function

Introduction

This article will help you learn about Azure Functions and how to create Azure Functions in the Azure Portal.

This article will cover the following.

  • Brief concepts of Azure Function
  • Creating Azure Function Service

Azure Function

Azure Functions is a serverless computing service and it's hosted on the Microsoft Azure public cloud. It is designed to accelerate and simplify application development. The cloud provider takes care of all the headaches of running the server, dynamically managing the resources of the machine, etc. It also provides auto scalability.

Serverless applications, also known as Function-as-a-Service or FaaS, are an offering from most of the enterprise cloud providers in which they allow the users to only write code, and the infrastructure behind the scenes is managed by them.

Azure Functions is the event-based serverless application framework that can automatically scale up and down based on the executions that are being triggered. This Microsoft Azure service allows you to run small pieces of code in Node.js, C#, Python, PHP, and Java without any infrastructure configurations.

Purpose

Azure Functions lets you execute your code in a serverless environment without having to first create a VM or publish a web application.

Key Features

  • Intuitive, browser-based user interface - You can write code in the easy-to-use web interface.
  • write code in different programming languages
  • pay per function execution
  • parallel execution when multiple triggers occur
  • Supports Continuous Deployment and Integration

Supported Languages

Azure Function supports multiple languages and it is based on the Runtime versions.

  • Functions 1. x: It supports C#, F#, JavaScript. But Functions 1. x is only in maintenance mode.
  • Functions 2. x: It supports C# (.NET Core 2.2), JavaScript (Node 8 & 10), F# (.NET Core 2.2), Java 8, PowerShell Core 6, Python 3.7.x, Typescript.
  • Functions 3. x: It supports C# (.NET Core 3. x), JavaScript (Node 8 & 10), F# (.NET Core 3. x), Java (Java 8), PowerShell Core 6, Python 3.7.x, TypeScript (Preview).

Ref: https://docs.microsoft.com/en-us/azure/azure-functions/supported-languages

Create the Azure Function in the Azure Portal

Prerequisites

  • Microsoft Azure Account.

Follow the below steps to create an Azure Storage Account.

Step 1. Log in here. On the dashboard, choose "Create a resource", and click "Compute". Now, choose "Function App".

Create a resource

Step 2. Enter the details for fields - choose the subscription, resource group, storage name, location, performance, account type, replication, and access tier. Let's see each, one by one.

Resource group

  • Azure Subscription: A subscription is an agreement with Microsoft to use Microsoft cloud platforms or services. And the charges are based on either a per-user license fee or on cloud-based resource consumption. So select your appropriate subscription. It will be billed for the services in the account.
  • Resource group: A resource group contains the resources required for successful deployment of your Service in Azure. It is a container that holds related resources for an Azure solution. Choose your Resource group or Create a new resource name that must be unique.
  • Function App name: Here, we choose a name for our Storage. It must be unique. It must be between 3 and 24 characters in length and may contain numbers and lowercase letters only.
  • Publis: Choose your code or Docker Container
  • Runtime Stack: Choose your favorite programming Language.
  • Version: Choose the version of your installed runtime.
  • Region: Choose your region near to you.

Now, click on Hosting

Step 3. Here, choose the following settings.

Hosting

  • Storage Account: Create a storage account used by your function app
  • Operating System: You can choose either Windows or Linux
  • Azure Function plan: We have 3 options here - Default is Consumption plan

Step 4. In the monitoring tab, choose Application Insights.

Application Insights

And Click on Review+ Create

Step 5. Review all the settings and click on Create

 Review+ Create

Step 6. Now, deployment is complete. And click on Go to Resource.

Deployment is complete

Output

Now, we can see the overview page of Azure Function.

 Azure Function

Summary

I hope you understand Azure Functions. Stay tuned for more articles on Azure Functions.