Azure Blob storage bindings for Azure Functions overview

Azure Functions integrates with Azure Storage via triggers and bindings. Integrating with Blob storage allows you to build functions that react to changes in blob data as well as read and write values.

Action Type
Run a function as blob storage data changes Trigger
Read blob storage data in a function Input binding
Allow a function to write blob storage data Output binding

Add to your Functions app

Functions 2.x and higher

Working with the trigger and bindings requires that you reference the appropriate package. The NuGet package is used for .NET class libraries while the extension bundle is used for all other application types.

Language Add by... Remarks
C# Installing the NuGet package, version 3.x
C# Script, Java, JavaScript, Python, PowerShell Registering the extension bundle The Azure Tools extension is recommended to use with Visual Studio Code.
C# Script (online-only in Azure portal) Adding a binding To update existing binding extensions without having to republish your function app, see Update your extensions.

Storage extension 5.x and higher

A new version of the Storage bindings extension is available as a preview NuGet package. This preview introduces the ability to connect using an identity instead of a secret. For .NET applications, it also changes the types that you can bind to, replacing the types from WindowsAzure.Storage and Microsoft.Azure.Storage with newer types from Azure.Storage.Blobs. Learn more about these new types are different and how to migrate to them from the Azure.Storage.Blobs Migration Guide.

Note

The preview package is not included in an extension bundle and must be installed manually. For .NET apps, add a reference to the package. For all other app types, see Update your extensions.

Functions 1.x

Functions 1.x apps automatically have a reference the Microsoft.Azure.WebJobs NuGet package, version 2.x.

Azure Storage SDK version in Functions 1.x

In Functions 1.x, the Storage triggers and bindings use version 7.2.1 of the Azure Storage SDK (WindowsAzure.Storage NuGet package). If you reference a different version of the Storage SDK, and you bind to a Storage SDK type in your function signature, the Functions runtime may report that it can't bind to that type. The solution is to make sure your project references WindowsAzure.Storage 7.2.1.

host.json settings

Note

This section does not apply when using extension versions prior to 5.0.0. For those versions, there are no global configuration settings for blobs.

This section describes the global configuration settings available for this binding when using extension version 5.0.0 and higher. The example host.json file below contains only the version 2.x+ settings for this binding. For more information about global configuration settings in Functions versions 2.x and beyond, see host.json reference for Azure Functions.

{
    "version": "2.0",
    "extensions": {
        "blobs": {
            "maxDegreeOfParallelism": "4"
        }
    }
}
Property Default Description
maxDegreeOfParallelism 8 * (the number of available cores) The integer number of concurrent invocations allowed for each blob-triggered function. The minimum allowed value is 1.

Next steps