Pricing/hosting plans
For Azure Functions, the consumption plan and App Service Plan can both be utilized:
- Consumption plan: In consumption plan hosting, we only pay for the time of execution of the function and not for the entire duration.
- App Service plan: In App Service plan hosting, we need to pay for all the resources allocated under the App Service plan for the entire time the App Service plan exists:
![](https://static.packt-cdn.com/products/9781787122932/graphics/85d1913d-1936-4ed6-b347-98af65d89a9f.png)
In earlier chapters, we have utilized the consumption plan for all our functions. Go to App Services
and verify the plan:
![](https://static.packt-cdn.com/products/9781787122932/graphics/75b57ef9-0ccf-464a-886b-e76acbf87967.png)
Go to Function Apps
in Azure Portal and verify the App Service plan; it is the same as the consumption plan:
![](https://static.packt-cdn.com/products/9781787122932/graphics/8252d0f5-aed6-477c-b619-9c11ed6458f6.png)
Let's see how to create Azure Functions in the App Service plan:
- Create a new Function App.
- In the App Service plan, click on
Create New
. - Provide the
App Service plan
name,Location
, andPricing tier
details.
- Click on
OK
:
![](https://static.packt-cdn.com/products/9781787122932/graphics/f56b8c2c-be74-439f-bbb7-735115e8bfad.png)
- Click on
Create
to create the Function App in the App Service plan:
![](https://static.packt-cdn.com/products/9781787122932/graphics/fc3f8bf4-11ad-40bf-a03f-d9b83f4ef5b8.png)
- Now, we have two Function Apps in the Azure dashboard available. One has the consumption...