Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Function App AzureWebJobsStorage vs WEBSITE_CONTENTAZUREFILECONNECTIONSTRING

The Azure function app official documentation lists two app settings which seem identical to me.

AzureWebJobsStorage

The Azure Functions runtime uses this storage account connection string for normal operation. Some uses of this storage account include key management, timer trigger management, and Event Hubs checkpoints. The storage account must be a general-purpose one that supports blobs, queues, and tables.

WEBSITE_CONTENTAZUREFILECONNECTIONSTRING

Connection string for storage account where the function app code and configuration are stored in event-driven scaling plans.

It seems both point to the storage account the function uses to store its files.

So, what is the difference between them and do I need both of them?

like image 473
Inshallah Avatar asked Oct 15 '25 16:10

Inshallah


1 Answers

I agree with @Dai and @Nadeem Khan

AzureWebJobsStorage:

  • As Mentioned in the MSDocs

    The Azure Functions runtime uses this storage account connection string for normal operation. Some uses of this storage account include key management, timer trigger management, and Event Hubs checkpoints. The storage account must be a general-purpose one that supports blobs, queues, and tables.

  • It is used to configure the Azure Functions runtime to store internal operational data, such as function triggers, checkpoints, and logs. It also serves as the default storage account for your functions if you don't specify a specific storage account for a function.

  • It should be set to a connection string for an Azure Storage account (usually a blob storage account). This storage account is used for maintaining the state and coordination of your function app.

WEBSITE_CONTENTAZUREFILECONNECTIONSTRING:

  • It is used for Azure Functions running in a Consumption Plan when you need to enable read-only access to files in a file share. For both Windows and Linux. For reference check this MS Docs.

  • It should be set to a connection string that points to an Azure File Storage account. A file share will be created in the storage account.

Summary,

AzureWebJobsStorage is primarily used for internal Azure Functions operational data and can be any Azure Storage account, while WEBSITE_CONTENTAZUREFILECONNECTIONSTRING is used specifically for read-only access to files in Azure File Storage when you're using the Consumption Plan. It is created in Consumption and Elastic premium plan only as mentioned in MS Doc.

I have create three Function of each app service plan. You can see WEBSITE_CONTENTAZUREFILECONNECTIONSTRING available in Consumption and Elastic Premium Plan

appsettingfunc with Consumption Plan:

enter image description here

appsettingfuncnon-consumption with Basic Plan:

enter image description here

appsettingfunc-premium with Elastic Premium Plan:

enter image description here

like image 61
Vivek Vaibhav Shandilya Avatar answered Oct 18 '25 09:10

Vivek Vaibhav Shandilya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!