My Azure Function, invoked by a BlobTrigger, queries a SQL database and uploads the blob to Sharepoint using REST API. On average it takes about 5s to execute all the code. No issues here.
The problem is when many blobs get placed in the Blob Container at the same time and the Azure Function processes them in parallel. SQL queries may return wrong results, and Sharepoint uploads will fail often. To avoid this I want to process only one blob at a time.
I have no access to Event Grid (not part of our company's subscription). What other options are available to scale my project?
EDIT: As an example, I just uploaded 7 unique blobs (PDF-files) from which the Function extracts a Document number, queries a SQL db and awaits a response. When uploading one at a time, I ended up with 7 unique SQL responses. When uploading all blobs at the same time, I received the same SQL response 7 times.