How to Create an Azure Function App

TheComputerTutor
3 min readApr 4, 2022

--

In computing, a function (sometimes referred to as a method) has one mission in life. It is usually responsible for one job and then it is done.

An Azure Function App is no exception. An Azure Function App is a container to hold your functions. There are certain considerations to function apps, such as requiring a storage account that can be found here. In this tutorial I will demonstrate how to quickly set up an Azure Function App in the Azure Portal that will remove some unwanted characters from a string and return a result.

What you will need for this tutorial:
1. Basic Azure Subscription for your logic app (Create Your Azure Free Account Today | Microsoft Azure).
2. Postman (Download Postman | Get Started for Free)
3. Prewritten Azure Function App C# code (Github).

Once your Azure subscription is set up, from “Home” select “Create a resource”. In the search type “function app” and click enter, then “Create”.

create your new function app
  1. Select your subscription
  2. Select your resource group. Create a new one if you haven't already.
  3. Give your function app a unique name.
  4. For this demo I am publishing via code
  5. I am using the .Net Runtime stack on Version 3.1
  6. Select your region. For this demo I am using East US

Select “review + create” then “Create”

create your function app

Once your function app is successfully deployed select “Go to resource”. Here is where you will design your function app. Navigate to the “Functions” blade then click “+ Create” to create a new function. On the Create function pane, notice there are several development options for creating a function app, such as Visual Studio. For this demo we will go with the default “develop in portal” option in the dropdown. Also notice the various starter templates that you can use for lots of common scenarios. For this demo we will select an HTTP trigger template. Give the function a unique name and for Authorization level we will set to Anonymous for now, which is the least secure option you would only use for demo or non-production purposes.

create your function

Once your function is created in your function app, click the “Code + Test” blade to develop your function. From here you can write your own C# code, or you could use a sample here. Once done click Save then navigate to the Overview blade of the function. Select “Get Function URL” from the top menu then copy the URL from the popup.

Now open Postman and open a new tab to make a GET request to your new function app. Paste the URL you copied from your function app in the request bar and for the body of the request use the example below if you are using the function app code provided.

{

“name”: “RT @StandUpAK: @lisamurkowski expecting a similar announcement from your office. Please and Thank You. #SCOTUSConfirmation #KBJconfirmation…”

}

If everything went as expected, you should get a 200 status and the response should have been scrubbed of single and double quotes.

test your function app via Postman

--

--

TheComputerTutor

Helping you learn all you need to know about computing...for FREE!