Migrate Azure Functions From Consumption Plan To Higher Plans – Comprehensive Guide

9 Min. Read

Updated April 2026: Microsoft’s current Azure Functions guidance has changed for reverse migration. The FAQ below was updated to reflect the latest supported plan migration paths and current limitations, especially for Premium ↔ Consumption, Linux, and Flex Consumption.

As a developer, you may have started with Azure Functions on the Consumption Plan, and as your workload grows, you may need to consider moving your functions to higher plans to better manage the resources allocated to your functions.

Furthermore, some features are not supported on the Consumption Plan such as Private endpoints, VNet integration, and Hybrid connections, those features are only supported on higher plans. This article will cover how to migrate Azure Functions from Consumption Plan to higher plans (Basic, Standard, or Premium plans).

Introduction

Azure Functions is a serverless computing service offered by Microsoft Azure. It allows you to run small pieces of code, called functions, without having to worry about the infrastructure and maintenance required to manage servers.

There are three main ways to deploy Azure Functions: using a Consumption plan, a Premium plan, or a Dedicated plan.

In a Consumption Plan, Azure Functions are dynamically scaled based on the number of incoming events. This means that the platform automatically allocates resources as needed to handle the incoming workload. The billing for this plan is based on the number of executions and the execution time. This is ideal for scenarios where the function is not used frequently, a good example of this is a Time Trigger event or the workload is unpredictable.

On the other hand, an App Service Plan is a more traditional approach where you can reserve dedicated virtual machine instances to run your Azure Functions. This provides more control over the underlying infrastructure, which allows you to fine-tune the resources to meet your specific needs. The billing for this plan is based on the size of the virtual machine and the number of instances. This is suitable for scenarios where the function is used frequently or there are specific performance requirements that need to be met.

The Consumption Plan pricing tier is referred to as Y1 as shown in the figure below.

Azure Function Consumption Pricing Plan Y1
Azure Function Consumption Pricing Plan Y1

You can use the following REST API GET command to get the list of App Service Plan SKUs available to an existing App Service Plan that is supported.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/skus?api-version=2022-03-01

At the time of this writing, we cannot list all SKUs that are available directly using PowerShell or Azure CLI. However, you could use the following Invoke-RestMethod cmdlet to list all the supported SKUs using PowerShell:

$subscriptionId = "aaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
$resourceGroupName = "ResourceGroupName"
$appServiceName = "AppServicePlanName"

#! Install Az Module If Needed
function Install-Module-If-Needed {
    param([string]$ModuleName)
 
    if (Get-Module -ListAvailable -Name $ModuleName) {
        Write-Host "Module '$($ModuleName)' already exists, continue..." -ForegroundColor Green
    } 
    else {
        Write-Host "Module '$($ModuleName)' does not exist, installing..." -ForegroundColor Yellow
        Install-Module $ModuleName -Force  -AllowClobber -ErrorAction Stop
        Write-Host "Module '$($ModuleName)' installed." -ForegroundColor Green
    }
}

#! Install Az Accounts Module If Needed
Install-Module-If-Needed Az.Accounts

#! Check Azure Connection
Try { 
    Write-Verbose "Connecting to Azure Cloud..." 
    Connect-AzAccount -ErrorAction Stop | Out-Null 
}
Catch { 
    Write-Warning "Cannot connect to Azure Cloud. Please check your credentials. Exiting!" 
    Break 
}

$Token = "Bearer {0}" -f (Get-AzAccessToken -Resource "https://management.azure.com").Token
$Headers = @{ 'Authorization' = $token ; 'Content-Type' = 'application/json' }

$Uri = "https://management.azure.com/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroupName)/providers/Microsoft.Web/serverfarms/$($appServiceName)/skus?api-version=2022-03-01"

$response = Invoke-RestMethod -Uri $Uri -Headers $Headers -Method Get
$response.value.sku
List of App Service Plan SKUs available using PowerShell
List of App Service Plan SKUs available using PowerShell

Why Migrating from a Consumption Plan To Higher Plans

There are several reasons why you might consider migrating from an Azure Functions Consumption Plan to Higher Plan (Premium or App Service Plan):

[1] Increased control over resources

With an App Service Plan, you have more control over the underlying infrastructure, including inbound and outbound traffic which can be important if you have specific performance requirements or if you need to fine-tune the resources to optimize cost.

For example, Private endpoints are only supported on Basic, Standard, Elastic Premium, Premium V2, Premium V3 plans, and Isolated V2 on App Service Environment that allows private endpoints. And virtual network integration and Hybrid connections are only supported on Basic and higher plans.

Function App Networking Features
Function App Networking Features

In contrast, with a Consumption Plan, the platform handles the resource allocation automatically based on demand, which may not be suitable for all scenarios.

[2] Persistent connections

Azure Functions running on a Consumption Plan have a limit on the maximum execution time and the number of concurrent executions. If your function needs to maintain persistent connections to other resources (such as a database), this can be a limitation.

With an App Service Plan, you can run your functions on dedicated virtual machines, which provide more control over resources and allow for longer execution times and persistent connections.

[3] Custom dependencies

In some cases, your Azure Functions may require custom dependencies or specific software versions that are not available on the Consumption Plan. With an App Service Plan, you can install and configure custom dependencies to meet the specific needs of your functions.

[4] Compliance requirements

If your organization has specific compliance requirements, such as data residency or regulatory compliance, an App Service Plan may be a better option as it allows for more control over the underlying infrastructure.

In summary, the Consumption Plan is optimized for event-driven workloads and dynamically scaled based on the number of incoming events. The ‘Premium‘ plan is for enterprise-level, serverless applications with event-based scaling and network isolation. The ‘App Service Plan‘ is for reusing compute from the existing app service plan.

Let’s see how to migrate Azure Functions to higher plans.

Prepare for Migration

Before you move and migrate Azure Functions to higher plans, you need to evaluate the current usage and requirements, then choose the appropriate App Service Plan. The price will differ based on the tier you select.

To learn more about the different Azure App Service tiers, check the official pricing page for Linux and Windows.

For the purpose of this example, we will migrate Azure Functions from the consumption plan to use a dedicated environment (Basic Service Plan).

Basic Service Plan
Basic Service Plan

The good news is that we can change the App Service Plan without recreating a new service plan, downloading, or recreating a new Function App!

As a precaution, make sure you have a backup of your Function App before you proceed. Better Safe than Sorry!

As a side note, Azure Functions runs on a number of SKUs, the Premium Plan and the Consumption Plan rely on Azure Files (file shares) to store the App content.

With the current implementation of Backup and Restore it’s not possible to store snapshots of the content on Azure Files as opposed to App Service where the content is stored on Microsoft file servers. Furthermore, you can leverage the CI/CD so you can back up your content in Source Control using Azure DevOps Pipeline or GitHub Actions, for example.

Prerequisites

To migrate Azure Functions to a new pricing tier, you need to have the following:

1) Azure subscription – If you don’t have an Azure subscription, you can create a free one here.

2) Function App with App Service plan consumption-based, you can refer to the following article for more details. The Operating System could be Linux or Windows.

Create Function App Consumption Plan
Create Function App Consumption Plan

3) You need either Azure CLI version 2.47.0 or higher, at the time of this writing, we are using version 2.47.0. You can check the CLI version on your machine and upgrade its version with the following commands:

# Check Azure CLI version
az --version

# Upgrade Azure CLI
az upgrade

4) Or the Azure PowerShell (Az module) installed locally on your machine. You can use the following PowerShell command to install and update the “Az module”.

# Make sure you have the latest version of PowerShellGet installed
Install-Module -Name PowerShellGet -Force

# Install and update to the latest Az PowerShell module
Install-Module -Name Az -AllowClobber -Force

You can skip points 3 and 4 if you prefer to use the Azure Cloud Shell instead.

Assuming you have all the prerequisites in place, take now the following steps:

Migrate Azure Functions

Here is our Function App running on the Consumption Plan (Y1).

Migrate Azure Functions - Function App running on Y1 Plan
Migrate Azure Functions – Function App running on Y1 Plan

To migrate Azure Functions and change the App Service tier plan from the Consumption plan to the Basic, Standard, or Premium plan, you need to use Azure PowerShell or the Azure CLI.

Azure PowerShell

To change and upgrade the App Service Plan without breaking your Function App, you can use the following PowerShell commands.

As a side note, you can use the PowerShell environment in Azure Cloud Shell.

$subscriptionId = "aaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
$resourceGroupName = "ResourceGroupName"
$appServiceName = "AppServicePlanName"
$pricingTier = "B1"

#! Install Az Module If Needed
function Install-Module-If-Needed {
    param([string]$ModuleName)
 
    if (Get-Module -ListAvailable -Name $ModuleName) {
        Write-Host "Module '$($ModuleName)' already exists, continue..." -ForegroundColor Green
    } 
    else {
        Write-Host "Module '$($ModuleName)' does not exist, installing..." -ForegroundColor Yellow
        Install-Module $ModuleName -Force  -AllowClobber -ErrorAction Stop
        Write-Host "Module '$($ModuleName)' installed." -ForegroundColor Green
    }
}

#! Install Az PowerShell Module If Needed
Install-Module-If-Needed Az

#! Check Azure Connection
Try { 
    Write-Verbose "Connecting to Azure Cloud..." 
    Connect-AzAccount -ErrorAction Stop | Out-Null 
}
Catch { 
    Write-Warning "Cannot connect to Azure Cloud. Please check your credentials. Exiting!" 
    Break 
}

Set-AzContext -Subscription $subscriptionId | Out-Null 

Set-AzAppServicePlan -ResourceGroupName $resourceGroupName -Name $appServiceName -PerSiteScaling $true -tier $pricingTier

Now let’s go back to the Azure portal and refresh the App Service Plan page. As shown in the figure below, the App Service Plan has been changed from Y1 to the B1 pricing plan.

Migrate Azure Functions using PowerShell
Migrate Azure Functions using PowerShell

You can also validate the same on the Azure Function App page.

Migrate Azure Functions - Function App running on B1 Plan
Migrate Azure Functions – Function App running on B1 Plan

Azure CLI

To change and upgrade the App Service Plan without breaking your Function App, you can use the following Azure CLI commands:

As a side note, you can use the Bash environment in Azure Cloud Shell.

$subscriptionId = "aaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
$resourceGroupName = "ResourceGroupName"
$appServiceName = "AppServicePlanName"
$pricingTier = "B2"

# Sign in to Azure -> Skip if you are using the Cloud Shell
az login 

# Set the Azure context for the desired subscription where your virtual machine and vault are deployed
az account set --subscription $subscriptionId

# Update the App Service plan tier 
az appservice plan update --name $appServiceName --resource-group $resourceGroupName --sku $pricingTier

Now let’s go back to the Azure portal and refresh the App Service Plan page. As shown in the figure below, the App Service Plan has been changed from B1 to a B2 pricing plan.

Migrate Azure Functions - Function App running on B2 Plan
Migrate Azure Functions – Function App running on B2 Plan

ARM Template, Bicep, Terraform

If you prefer to use an ARM template, Bicep, or Terraform to upgrade the hosting plan, then you can use the following logic.

You set first the desired name property for the SKU that you want to use, such as “B1”, “B2”, “S1”, and so on.

{
  "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "appServicePlanSkuName": {
      "type": "string",
      "allowedValues": [
        //name  Tier          Full name
        "D1",   //Shared      an D1 Shared
        "F1",   //Free        an F1 Free
        "B1",   //Basic       an B1 Basic
        "B2",   //Basic       an B2 Basic
        "B3",   //Basic       an B3 Basic
        "S1",   //Standard    an S1 Standard
        "S2",   //Standard    an S2 Standard
        "S3",   //Standard    an S3 Standard
        "P1",   //Premium     an P1 Premium
        "P2",   //Premium     an P2 Premium
        "P3",   //Premium     an P3 Premium
        "P1V2", //PremiumV2   an P1V2 PremiumV2
        "P2V2", //PremiumV2   an P2V2 PremiumV2
        "P3V2", //PremiumV2   an P3V2 PremiumV2
        "I1",   //Isolated    an I2 Isolated
        "I2",   //Isolated    an I2 Isolated
        "I3",   //Isolated    an I3 Isolated
        "Y1",   //Dynamic     a  function consumption plan
        "EP1",  //ElasticPremium
        "EP2",  //ElasticPremium
        "EP3"   //ElasticPremium
      ]
    },

And then you define the ARM template resource definition for ‘Microsoft.Web/serverfarms‘ as follows:

  "resources": [
    {
      "location": "[parameters('location')]",
      "name": "[parameters('appServicePlanName')]",
      "type": "Microsoft.Web/serverFarms",
      "apiVersion": "2018-02-01",
      "kind": "linux",
      "properties": {
        "name": "[parameters('appServicePlanName')]",
        "reserved": true,
        "targetWorkerCount": 1,
        "targetWorkerSizeId": "[parameters('appServicePlanWorkerSizeId')]",
      },
      "sku": {
        "name": "[parameters('appServicePlanSkuName')]"
      }
    }

For more information, please refer to the official Microsoft documentation page.

That’s it there you have it!

Migrate Azure Functions – FAQs

What is the difference between the Consumption Plan and a higher plan?

The Consumption Plan is a serverless hosting option that dynamically scales based on demand and charges based on usage. Today, Microsoft recommends Flex Consumption as the preferred serverless hosting option for Azure Functions. Premium is designed for workloads that need capabilities such as always-ready / prewarmed instances, virtual network connectivity, longer execution support, and more predictable performance. Dedicated (App Service) runs your functions on regular App Service plan resources and is better suited when you want fixed capacity, predictable billing, or to share compute with other apps.

Can I switch back to the Consumption Plan after migrating to a higher plan?

Yes, but only in specific scenarios.

Based on Microsoft’s current guidance, plan migration is supported only between Consumption and Premium on Windows Function Apps. There are several important limitations:

  • Direct migration to a Dedicated / App Service plan is not supported
  • Migration is not supported on Linux
  • The source and target plans must be in the same resource group and geographical region
  • Downtime can occur during the migration process
  • In-place migration to or from Flex Consumption is not supported; moving to Flex requires creating a new Function App

For Premium to Consumption on Windows, the supported approach is not to change the SKU directly with Set-AzAppServicePlan. Instead, the recommended approach is to:

  1. Create a temporary Function App on the Consumption Plan in the same resource group and region.
  2. Get the name of the Consumption plan created with that temporary app.
  3. Move the existing Premium Function App to that new Consumption plan by using Azure CLI, Azure PowerShell, or the Azure portal.
  4. Delete the temporary Function App and remove the old Premium plan when no longer needed.

Will upgrading the Azure Functions plan affect my client applications?

Usually, your client applications do not need to change just because the hosting plan changes. However, Microsoft notes that downtime can occur during plan migration, so you should validate the Function App after the move and test triggers, networking, identity, and configuration before considering the migration complete.

Can I move individual functions between App Service plans instead of the entire Function App?

No. You move the entire Function App, not individual functions separately.

When moving a Function App to another App Service plan, the source and target plans must be in the same resource group, geographical region, and OS type. Also, if virtual network integration is enabled on the app, it must be disabled before you change the App Service plan.

Can I monitor resource usage on the App Service Plan?

Yes. You can monitor Azure Functions by using Azure Monitor and Application Insights. Azure Functions has built-in integration with Application Insights, and Azure Monitor can also be used to monitor the function app and related platform metrics.

Conclusion

Migrating Azure Functions from the Consumption Plan to the App Service Plan can help you better manage resources and scale as your workload grows. By following the steps outlined in this article, you can successfully migrate your Azure Functions to Basic, Standard, or Premium plans.

In summary, the main difference between the two plans is that the Consumption Plan is a fully-managed serverless solution that automatically scales based on demand, while the App Service Plan offers more control over the underlying infrastructure and network, and is ideal for more predictable workloads.

See Also: How to manage an App Service plan in Azure.

__
Thank you for reading my blog.

If you have any questions or feedback, please leave a comment.

-Charbel Nemnom-

Previous

Microsoft Certified Trainer 2023-2024 #MCT

Protect Azure Storage In Microsoft Defender for Cloud – Comprehensive Guide

Next

10 thoughts on “Migrate Azure Functions From Consumption Plan To Higher Plans – Comprehensive Guide”

Leave a comment...

  1. Hey Charbel,

    Nice blog!
    Need to know if there are other dependencies to ensure when we change the hosting plan type, like private endpoint.
    How these will be ensured also can I make a deployment using the ARM template?

  2. Thank you, Vipul, for your feedback!
    There is no impact if you are already using Private endpoints on your existing hosting plan that you want to upgrade.
    However, if you want to downgrade to the Consumption Plan from let’s say Basic or Standard Plan and you are using Private endpoints, then it’s going to fail.
    Yes sure, you can use ARM Template, Terraform, or Bicep to migrate to a new hosting plan.
    You set the App Service Plan Sku name first, and then you target the “Microsoft.Web/serverFarms” as a resource type to upgrade.
    I have updated the article to include the ARM Template example.
    Hope it helps!

  3. Hi Charbel,

    Need to know about other dependencies which come with a Premium hosting plan like,
    Private endpoint and VNet integration will be also ensured/created once we migrate the function app from Consumption to Premium.
    Or do we need to create them separately?

    Thanks
    Vipul Dabhi

  4. Hello Vipul, thanks for the clarification!
    As you probably know, the Consumption Plan does not have a Private endpoint and VNet integration capability.
    So, once you migrate your function app from Consumption to the Premium plan, you need to configure those additional networking features individually.
    Those features are environment-specific to your needs, they don’t get created automatically.
    That is the main reason to migrate the function app from Consumption to Premium to enable Private endpoint and VNet integration features. You need to configure them separately afterwards.
    Hope it helps!

  5. Does the Premium Function App have the option to sync up with Log Analytics Workspace?
    The Function App is fetching the Logs from 3rd party using Python code stored in the Storage Account (created when we create the function app).
    Need to know how those logs can be consumed or routed to a Log Analytics Workspace?

  6. Seems like there’s no way to migrate out of Elastic Premium once you’re in? I tried the Powershell command above to move to both Y1 and B1 and got a ‘bad request’ error.

  7. Hello Dan, thanks for the comment and for sharing your experience!
    Moving from Elastic Premium to Basic/Dedicated (like B1) is not supported. However, moving from Elastic Premium back to Consumption (Y1) is supported only for Windows apps, and only by using Microsoft’s documented migration flow: create a temporary Consumption function app first, use the plan it creates, then move the existing app to that plan.
    If the Function App is Linux, or if you want Flex Consumption, the supported approach is to create a new Function App and redeploy.
    You can still migrate from the Consumption → higher plan direction, but the old Set-AzAppServicePlan downgrade approach is no longer “safe” against current Microsoft guidance.
    Hope it helps!

Let us know what you think, or ask a question...