Deploy Azure Function - Blob Trigger From Visual Studio

Introduction

 This article will help you learn how to Deploy Azure Function – Blob Trigger from Visual Studio.

 Before reading this article, please go through some important articles mentioned below,

  1. Exploring About Azure Function
  2. Create Http Trigger Azure Function In Azure Portal
  3. Create The Timer Trigger Azure Function In Azure Portal
  4. Create Durable Function In Azure Portal
  5. Create Durable Function In Visual Studio
  6. Create Azure Function In Visual Studio
  7. Create Azure Function - Blob Trigger In Azure Portal
  8. Create Azure Function - Queue Trigger In Azure Portal
  9. Create Azure Function - Timmer Trigger In Visual Studio
  10. Create Azure Function - Blob Trigger in Visual Studio

Azure Function

Azure Functions is a serverless computing service and is 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, is 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 which 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.

Here, we will see about Azure Function.

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

Deploy Azure Function – Blob Trigger from Visual Studio

Prerequisites

  • Microsoft Azure Account.

Follow the below steps to create an Azure Storage Account.

Step 1

Log in here. Please go through the article mentioned below for creating Azure Function Blob Trigger in visual studio.

Once it is created, we can see coding. It’s similar to function coding created in portal. This is Blob Trigger Function coding.

Deploy Azure Function – Blob Trigger from Visual Studio

Step 2

Right Click on the Solution Explorer and choose Publish

Deploy Azure Function – Blob Trigger from Visual Studio

Step 3

We can have publish window. Now, choose Azure here and hit on next button.

Step 4

Next, choose Azure Function App(Window). Then click on the next button.

Step 5

In the next window, choose subscription name and click on create a new function option

Deploy Azure Function – Blob Trigger from Visual Studio

Step 6

Next, choose Function Name, Plan Type, Location, Azure Storage, and click on Create

Deploy Azure Function – Blob Trigger from Visual Studio

Step 7

Finally, our function added and click on the finish button

Step 8

Now, it's ready to publish

Deploy Azure Function – Blob Trigger from Visual Studio

Then, click on publish button.

Now, we get this message

Output

Run the code.

Now, Open the storage account and click on upload to upload the file in the container

Add “workitem.txt” file into the container

Now, its added to container

Now, open the visual studio. we can successfully run our blob trigger function here. The output will look like this.

Deploy Azure Function – Blob Trigger from Visual Studio

Now, open the BlobTigger function in Azure portal and click on Test/Run

Now it's successfully running

Deploy Azure Function – Blob Trigger from Visual Studio

Summary

 I hope you understood how we can deploy a Blob trigger function from Visual Studio. Stay tuned for more articles on Azure Function.