Skip to content

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure Functions Flex Consumption with Azure Files OS Mount Samples

This repository contains samples that demonstrate how to use OS-level file system mounts with Azure Functions Flex Consumption to access shared files and large binaries from Azure Files.

Each sample is an Azure Developer CLI (azd) template that provisions infrastructure using Azure Verified Modules (AVM) Bicep modules, deploys function code, and runs post-deployment setup — all with a single azd up command.

Samples

Sample Scenario Key Concepts
FFmpeg Image Processing Process images using an ffmpeg binary on an Azure Files OS mount, triggered by EventGrid blob events Large binary on mount, EventGrid blob trigger, subprocess calls
Durable Text Analysis Orchestrate parallel text file analysis using Durable Functions fan-out/fan-in against files on a shared mount Durable Functions, fan-out/fan-in, shared mount across instances

Prerequisites

Getting started

  1. Clone this repository:

    git clone https://github.com/Azure-Samples/Azure-Functions-Flex-Consumption-with-Azure-Files-OS-Mount-Samples.git
  2. Navigate to a sample folder and follow the instructions in its README.

Why OS mounts?

OS-level mounts let your function app access an Azure Files share as a local file system path. This means you can:

  • Run large binaries (ffmpeg, ImageMagick) from a mount instead of bundling them in your deployment package, keeping cold starts fast.
  • Share files across instances — every instance of your function app sees the same mounted share.
  • Use POSIX file I/O — read and write files with standard file system calls instead of SDK-based blob operations.

OS mounts are supported on Flex Consumption and Elastic Premium plans (Linux only). For more information, see Choose a file access strategy for Azure Functions.

Cross-platform support

Each sample includes post-deployment scripts for both platforms:

  • scripts/post-up.sh — Bash (Linux, macOS, Git Bash on Windows, Cloud Shell)
  • scripts/post-up.ps1 — PowerShell (Windows)

The azure.yaml configuration automatically selects the correct script for your OS.

Tutorials

Step-by-step tutorials for these samples are available on Microsoft Learn:

Related documentation

About

This repository contains production-ready samples and tutorials demonstrating how to use OS-level file system mounts with Azure Functions Flex Consumption to access shared data and large binaries from Azure Files.

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages