An image arrives in Blob Storage and needs resizing, but the resizing code may sit idle for hours. An Azure Function App gives that code a home; the Consumption plan lets it run when triggered instead of keeping capacity running all day. Execution scales automatically, even down to zero, and charges reflect executions and resources consumed. section 2.2.16 section 8.2.3
Choose the plan with its trade-offs in mind:
- Consumption suits infrequent or unpredictable traffic. The first 1 million executions per month are free, though resource consumption still matters to pricing. section 8.2.3
- Scaling to zero can mean a cold start after an idle period. If immediate execution matters more, Premium keeps prewarmed instances ready but charges for reserved capacity. section 8.2.3
- If you need more control over memory, scaling, or networking while retaining serverless billing, compare Flex Consumption. The classic Consumption plan does not support VNet integration. section 8.2.3
Create an image-resizing Function App
In the Azure Portal, find Function App, select Add, and choose Consumption. Enter a subscription, resource group, name, runtime, and region. One example uses .NET 8 (LTS) with the isolated worker model. On the Storage step, configure a storage account in the Function App’s region. The app needs storage for tasks such as trigger and binding metadata, code files, and logs; the plan does not remove that dependency. section 2.2.16
Table 8.3 Azure Function pricing for various hosting options
Compare Consumption’s per-execution pricing and free allowance with the different cost models of the other Azure Functions hosting options. section 8.2.3
