Switch Azure Function App from Dedicated App Service Plan to Premium

4.7k Views Asked by At

I am just wondering if there is a path to migrate a Function App that is hosted on a Dedicated App Service Plan to a Premium Plan?

I have tried using the Azure CLI to change the underlying App Service Plan but am getting this message:

Your functionapp is not using a Consumption or an Elastic Premium plan. Currently the switch is only allowed between a Consumption or an Elastic Premium plan.

Is there any other way other than completely recreating the Function App to do this?

2

There are 2 best solutions below

1
Pexers On BEST ANSWER

Function apps using the Dedicated App Service plan can't be changed to any other plan. This may be possible in the future, but not for now. You have to create a new function app in a different hosting plan and update/deploy your code.

Just like the error says, you can only switch between Consumption and Premium plans by changing the plan property of the function app resource.

References:

0
Tuukka Haapaniemi On

This is possible using PowerShell in Azure portal or from local machine:

Set-AzAppServicePlan -ResourceGroupName "[RG Name]" -Name "[Func App App Service Plan Name]" -PerSiteScaling $true -tier S1

This will change the App Service Plan into S1, and then it is possible to either change the Func App to another App Service Plan (remember to delete the old one!), or adjust the alterned plan as needed.

More detailed info here: https://prashanth-kumar-ms.medium.com/azure-functions-how-to-migrate-from-consumption-plan-to-app-service-plan-ce24d567d76c