Why do Azure Functions require a Storage account?

hawthorne91 190 Reputation points
2024-05-02T14:43:58.4233333+00:00

I was just curious as to why Azure Functions require a Storage account to function. I'm currently in the cost calculator, and I wanted to include the storage account associated with the Azure Function. However, from what I know, the storage account does not do any write, list and create container, or read operations. Maybe there is something behind "all other operations" that the Azure Function would require the storage account to do, but I just wanted some clarification on the topic. Thank you!

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,456 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.
2,795 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 99,046 Reputation points MVP
    2024-05-02T15:13:17.7766667+00:00

    Hi @hawthorne91 ,

    as far as I know the Azure Storage is/can be used by Azure Functions to store the state, the code, possible triggers and logging.


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten


  2. TP 80,511 Reputation points
    2024-05-02T15:18:49.4666667+00:00

    Hi,

    The storage account is where the function's files are stored when using Consumption plan. Also it uses it for logs and facilitating certain features of the underlying functions infrastructure.

    For example, each instance has the Azure Files share mounted so that it has access to the function code, json files, etc.

    As a learning exercise if you create a function and then browse the storage account (Files, Blobs) you can see some of the objects that are created.

    Please click Accept Answer if the above was helpful.

    Thanks.

    -TP