Azure Function with Blob Output Binding returning 404 on GetProperties check before writing the Blob

Ian Larsen 26 Reputation points
2022-08-04T22:10:04.813+00:00

Hi.

This question is pretty much the same: https://stackoverflow.com/questions/64546302/how-to-disable-blob-existence-check-in-azure-function-output-binding
Wondering if there's other answers and more recent.

I have an Azure Function with an HTTP Trigger input binding and a Blob Storage output binding. For every execution, the output binding looks like it tries to get Blob Properties first, resulting in a 404 - quite rightly, as the data to be written is going to a new Blob. This will always fail and it's redundant in this case. It takes time to go through these steps - admittedly milliseconds, but still. Presumably it's also logging somewhere, so that's a storage cost - might be negligible now, but something to not be ignored. I'm not 100% sure where that logging would be stored, either, to go and manage it.

The positive is that the overall function execution is fine. But it's still recording all these failures, and we're getting 10s of thousands through it a day.

Is there a way to use the concise output binding code but not do this prior if-exists-get-properties check?
My options seem to be live with it, or rewrite to use BlobContainer, BlobClient and so on instead of the Blob attribute output binding.

Anyone got some clever ideas?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2022-08-23T05:27:45.07+00:00

    @88880620 Thanks for reaching out. AFAIK there is no properties in the storage output binding that can help you remove the check if the blob exists or not. I will confirm with my team and will keep you posted.

    **Update: **
    I got confirmation from the team that there is no way to turn off the tracking for storage call as Storage SDK will be doing this for us for the most part and this cannot be turned off.
    In case someone wants to disable all the Dependency Tracking then you can set the enableDependencyTracking to false in case you don't need it.

     “enableDependencyTracking”:”false”
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.