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 now available. It introduces the ability to connect using an identity instead of a secret. For a tutorial on configuring your function apps with managed identities, see the tutorial creating a function app with identity-based connections. For .NET applications, the new extension version 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.

This extension version is available by installing the NuGet package, version 5.x, or it can be added from the extension bundle v3 by adding the following in your host.json file:

{
  "version": "2.0",
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[3.3.0, 4.0.0)"
  }
}

To learn more, 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

This section describes the function app configuration settings available for functions that this binding. These settings only apply 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 function app configuration settings in versions 2.x and later versions, see host.json reference for Azure Functions.

Note

This section doesn't apply to extension versions before 5.0.0. For those earlier versions, there aren't any function app-wide configuration settings for blobs.

{
    "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