azureazure-functionsazure-api-managementazure-linux

Azure move function app to premium tier using APIM


I'm trying to migrate a Azure Linux/Python function app from the consumption tier to a Elastic Premium tier. It turns out this is not so easy: https://github.com/Azure/Azure-Functions/issues/155 . You basically have to recreate the Function from scratch.

As my function is sitting behind a APIM I thought it might be possible to do this by:

  1. Creating a new ASP with the correct tier
  2. Deploy Function into new ASP
  3. Switch the APIM back end of the API to the new function.

The trouble is I can't figure out how to do that last part. I can't seem to find where this is configured, or how to change it (via the portal or via CLI). I've even done some splunking in the configs using the new resources front-end https://resources.azure.com/ and can't even find where the APIM configuration for the backends reside.


Solution

  • You just need to go to your APIM, click "APIs" tab, choose your api under "All APIs", click "..." button of your api then import another function app to your APIM api.

    For example, I have a api under "All APIs" in my APIM. Its backend is a function app running with consumption plan. Like below screenshot:

    enter image description here

    Now I want to change the backend of the api to another function app which running with Elastic Premium tier. Just click "..." button of the api, and click "Import" like below screenshot:

    enter image description here

    Then choose "Function App" and select your new function app.

    enter image description here