How to edit a Azure function and redeploy

Vikram Dayananda 61 Reputation points
2024-02-08T13:16:07.0533333+00:00

Hi All, We have an ADF pipeline that runs an Azure function written in Python. We need to make some minimal changes to the function; however, editing the function is not allowed on the portal. Can you please help me with the steps to edit a function and redeploy it to Azure services? Note: I followed the below steps through VS Code, which didn't work for us. https://learn.microsoft.com/en-us/azure/azure-functions/functions-develop-vs-code?tabs=node-v3%2Cpython-v2%2Cisolated-process&pivots=programming-language-csharp Thanks, Vikram

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,013 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,114 questions
{count} votes

Accepted answer
  1. Hugo Barona 371 Reputation points MVP
    2024-02-08T17:43:17.93+00:00

    Hi Vikram,

    the link you have is good explaining how to create and deploy the function app from VS Code. Given that you have an existing function app running with some python, I would recommend the following:

    1. Download the content, project and settings of the existing function app (from the Azure portal) User's image
      1. Run the project locally and ensure it runs successfully. You need to check the Functions runtime used and ensure you have the Azure functions extension installed on your VS Code
    2. User's image
    3. Do the changes you need, test them and once your are happy deploy them to your Azure function app on Azure using the Azure extension and the Deploy to Function App option. Screenshot 2024-02-08 174216

    Hope this helps you out. Let me know what are the results.

    (If the reply was helpful, please don't forget to upvote and/or accept it as the answer, thank you)

    Regards
    Hugo Barona

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Mike Urnun 9,081 Reputation points Microsoft Employee
    2024-02-08T23:33:09.5+00:00

    Hello @Vikram Dayananda - Thanks for reaching out, and engaging us on the MS Q&A community. The in-portal editing is actually allowed for Python functions, but in this case, it's probably a case of deployments being set up in a local dev environment initially. The steps shared in Hugo's answer should help you accomplish redeploying with the newer changes. As you do this, be sure to familiarize yourself with the WEBSITE_RUN_FROM_PACKAGE setting and where it's pointing to serve your latest deployment on a Linux OS: Enable functions to run from a package If you hit a snag along the way, feel free to let us know here with any relevant details such as error messages, and exact steps taken, and we'd be happy to weigh in and help.

    0 comments No comments