If you have Azure Functions running on the Linux Consumption plan, it’s time to start planning for a migration.
On 30 September 2028, Microsoft will retire the Azure Functions Linux Consumption hosting plan. To avoid disruptions,you need to migrate your applications to the new Flex Consumption plan before that date. The Windows Consumption plan won’t be impacted by this change.
The Azure Function Flex Consumption plan has different advantages over the standard Consumption plan.
Feature | Flex Plan | Consumption Plan |
---|---|---|
Resource Control | Custom CPU/memory/OS | Auto-managed, limited control |
Cold Start | Predictable, minimized | Can be slow/unpredictable |
Networking | Advanced (VNET, private, etc.) | Basic |
Max Execution Time | Up to 4 hours | 5-60 minutes |
Idle Timeout | None | Yes (can be unloaded) |
Pricing | Per resource (predictable) | Per execution (variable) |
Due to the significant configuration and behavior differences between the two plans, you aren’t able to shift an existing Consumption plan app to the Flex Consumption plan. The migration process instead has you create a new Flex Consumption plan app that’s equivalent to your current app. This new app runs in the same resource group and with the same dependencies as your current app.
To start the migration process, first of all you need to verify to have Azure CLI 2.77.0 or later installed in your system.
If you’re on this version, the Azure CLI provides some commands that automate most of the steps required to move your Linux app from the Consumption to the Flex Consumption plan.
To list all the Linux Consumption function apps that are eligible for migration to the Flex Consumption plan, you can execute the az functionapp flex-migration list command:
This new command automatically scans your subscription for function apps and returns a JSON with two arrays:
If your Linux Consumption function apps are in an eligible state, you can start the migration to Flex Consumption plan bu executing the az functionapp flex-migration start command:
az functionapp flex-migration start --source-name <SOURCE_FUNCTION_APP_NAME> --source-resource-group <SOURCE_RESOURCE_GROUP> --name <NEW_FUNCTION_APP_NAME> --resource-group <NEW_RESOURCE_GROUP>
Before starting this command, create a new resource group in the same Azure Region as your current Linux Consumption function app’s resource group:
Then you can start the migration:
Now the function app is migrated successfully with all its related configurations.
After the first step describe above, you have a new empty Flex Consumption function app with all the settings of the migrated one.
To be able to redeploy your app code to the new function app, you must have either your project’s source files or the deployment package. If your project files are maintained in source control (always recommended not just for coding best practibe, but also because it’s the better way to deploy Azure Functions), you can easily redeploy that to the new Flex Consumption app via Deployment Center (just connect to your repo and you’re ready to go).
If instead you no longer have access to your project source files, you can download the current deployment package from the existing Consumption plan app via Azure Portal. To do that, there are some steps not really immediate…
First of all, in Azure Portal go to your old Linux Consumption function app and select Settings –> Environment Variables and check if a setting named WEBSITE_RUN_FROM_PACKAGE
exists.
Here:
WEBSITE_RUN_FROM_PACKAGE
exists, check if it’s set to a value of 1
or a URL. If set to a URL, that URL is the location of the package file for your app content. Download the .zip file from that URL location that you own.WEBSITE_RUN_FROM_PACKAGE
setting doesn’t exist or is set to 1
, you must download the package from the specific storage accountHere for example I don’t have the WEBSITE_RUN_FROM_PACKAGE
setting, so I’m in this second scenario:
In this case, retrieve the storage account name from the AzureWebJobsStorage
application setting:
In Azure Portal, select Storage Accounts and go to this storage account. Then go to Data Storage –> Containers and select the scm_releases container:
NOTE: to access the content of this storage account, you need to have the Storage Blob Data Reader
role assigned to your user (or you will spend hours on troubleshooting).
Here select the file named scm-latest-<APP_NAME>.zip
and select Download.
You can then deploy the package to the new Flex Consumption app by using the following command:
az functionapp deployment source config-zip --resource-group <RESOURCE_GROUP> --name <APP_NAME> --src <PACKAGE_PATH>
When everything is ready, you can delete your old Linux Consumption function app:
Original Post https://demiliani.com/2025/09/26/do-you-have-azure-functions-running-on-linux-consumption-plan-its-time-to-migrate/