Azure Function app and Storage Account VNet integrated - Deployment fails

Sheethal Pai 0 Reputation points
2024-01-04T10:30:24.3566667+00:00

An Azure function deployment runs fine with WEBSITE_CONTENTOVERVNET=1 & WEBSITE_VNET_ROUTE_ALL=1 added in config & enabled func-vnet access under storage account networking section.

But for the other Azure function having same configurations linked to same storage account - deployment fails with 500 error.

Should there be different storage accounts for every azure function?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,419 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,373 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Luis Arias 7,856 Reputation points
    2024-01-04T19:23:04.2333333+00:00

    Hi Sheethal Pai,

    Itsn't necessary to have different storage accounts for every Azure Function. However, according to Microsoft's best practices for Azure Functions, the storage account should be created in the same region as the function app to reduce latency. Besides, separate storage account for each function app is good to improve performance.

    To improve performance in production, use a separate storage account for each function app. This is especially true with Durable Functions and Event Hub triggered functions. https://learn.microsoft.com/en-us/azure/azure-functions/functions-best-practices?tabs=csharp#storage-account-configuration

    The 500 error could be due to a variety of reasons. It might be configuration or access to the storage account. It is recommended to troubleshoot the storage-related issues and ensure that the storage account connection string is properly configured in the AzureWebJobsStorage and WEBSITE_CONTENTAZUREFILECONNECTIONSTRING application settings. (https://learn.microsoft.com/en-us/azure/azure-functions/storage-considerations?tabs=azure-cli#storage-account-connection-setting)

    Note that services deployed in the same region as the storage account use private Azure IP addresses for communication to Azure storage (https://blog.brooksjc.com/2021/04/22/azure-functions-access-to-restricted-storage-accounts/). So, if you have restrictions or specific configurations on your network, it might affect the communication between your Azure function and the storage account.

    References:

    Cheers, Luis


    If the information helped address your question, please Accept the answer.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.