In this video, see how to set up your first Azure Functions app from the Azure portal.
- [Instructor] Let's see how to create an Azure Function app. Click on the Create a resource button in top left of the screen. There are a lot of functionalities available in Azure and you could create them all from here. You can browse through them, or use the search bar if you know what you're looking for. Type Function App in the search bar and hit Enter. Select the top result saying Function App. It will take you to a screen that explain what service you are about to create. Then click Create near the bottom. Now we need to configure our Azure Function app. Choose a name. It needs to be a unique one. This will be indicated by the icon behind the input box.
The subscription is your Azure subscription. You could have multiple subscriptions but typically you probably have just the one, and it is selected automatically for you. You will have to choose a resource group. A resource group is a logical grouping of Azure resources. You could put services that have to do with each other in one resource group. For now, we will create a new resource group by just entering a name for it. We will stick with the suggested name. Azure Functions can run on different platforms. We can run from Linux or even a Docker container.
For now, we will just stick with Windows. Here we can select what our hosting plan will be. When selecting Consumption Plan, we will pay for execution and resources are allocated dynamically based on the app's load. We can also choose App Service Plan, which gives us more control over dedicated resources and make costs and scaled more predictable. This is what I mentioned in an earlier video about the billing. We will select Consumption Plan. In the Location box, we can select where our app hosted in the world. This can have impact on response times and also you will have to consider local laws when working with sensitive data.
All locations are geographical locations where Microsoft has put data centers. The default location of Central US is good for now. In a more advanced scenario, you could deploy to multiple geographical locations and put an Azure traffic manager in front. This will route the client to the nearest location. Remember, functions are only billed when executed, so this doesn't even incur extra cost. As I mentioned, you could choose between programming languages to create your Azure function. Here you can choose which runtime stack is used for this function app.
We will stick with .NET. Because we chose Consumption Plan earlier, we also have to create an Azure storage service. This is needed to store our Azure functions' definitions. You can either select an existing one, or create a new one from here. I will create a new one with the generated random name. The last option is Application Insights, which is another service within Azure. It allows you to gather diagnostic data on applications. You can enable it to also gather useful information on your Azure function.
Note that this will affect your costs. Also, here you can choose where the application insights data is stored in the world. For now, I will disable this service. To create the service, click the Create button near the bottom and wait for a notification in the top right telling you that your new function app is successfully created. We've now created our first Azure function app.
- What serverless is and when to use it
- Creating Azure functions
- Creating your first Azure Functions App
- Creating an Azure function in Visual Studio
- Creating a new Xamarin.Forms app
- Use cases for Azure Functions in apps
- Securing Azure Functions apps
- Monitoring Azure functions in Production