0
votes

I have some e-mail attachments being saved to Azure Blob.

I am now trying to write a Azure Functions App that would connect to that blob storage, run some scripts and re-save the file.

However, when selecting a storage account for the function, I couldn't select my blob storage account.

I went on the website and it said this:

When creating a function app, you must create or link to a general-purpose Azure Storage account that supports Blob, Queue, and Table storage. Some storage accounts don't support queues and tables. These accounts include blob-only storage accounts and Azure Premium Storage.

I'm wondering, is there any workaround this? and if not, perhaps any other suggestions? I'm becoming a little lost in all the options, and which one to actually choose.

Thanks!

EDIT: Might I add I writing the function Python

3
Can you share the kind of storage account? Please ensure that it is “General Purpose”.Gaurav Mantri
is there a way to change my blob-only to general purpose without changing the files etc ?Nairda123
Unfortunately no. You will need to create a new account and copy the files yourself. When you create a new "General Purpose" account, please be sure to check to choose correctly between "v1" and "v2" accounts. "v2" accounts are more feature rich but are more expensive than "v1". My recommendation would be to go with "v1" account if you do not need features of "v2".Gaurav Mantri

3 Answers

1
votes

The snippet from the website you are quoting is for storing the function app code itself and any related modules. It does not pertain to what your function can access when the code of your function executes.

When your function executes it will need to use the Azure Blob Storage SDK/modules to connect to your blob storage account and read the email attachments. Here's a quickstart guide for using Azure Storage with Python: Quickstart with Azure Storage Blobs SDK for Python

0
votes

General-purpose v2 storage accounts support the latest Azure Storage features and incorporate all of the functionality of general-purpose v1 and Blob storage accounts here

There are more integration options with GPv2 accounts including Azure Function Triggers. See: Azure Blob storage bindings for Azure Functions

Further refer: Types of storage accounts If Blob, based on your need, you can choose an access tier based on the frequency of access for the data (e-mail attachments)Access tiers for Azure Blob Storage - hot, cool, and archive. If General purpose storage account, its standard performance tier.

0
votes

I think you are overlooking the fact that you can have multiple storage accounts. In order for an Azure Function to work you need a storage account. That storage account is used to store runtime information of the Azure Function for internal purposes like state management. This storage account is subject to restrictions as you already found out. There is no workaround for that.

However, if the function you are writing needs to access another storage account it is free to do so. You just have to provide details to connect to that specific storage account. In that case you also have a clear seperation between the storage account that is used by the azure function for its internal operations and the storage account your application needs to connect and which you have total control about withouth having to worry that you break things by deleting internal used blobs/tables/queues.

You can have a blob triggered function that gets triggered when changes occur on your specific blob storage. That doesn't need to be the storage account that the azure function internally uses, which is created/selected when creating the azure function.

Here is a sample that shows how to add a blob triggered azure function in Python. MyStorageAccountAppSetting refers to an app setting that holds the connection string to the storage account that you use for storage.