I am trying to create a function that is executed when a file .xlsx is created in a container, and to do that I am using an event grid as proposed by the azure documentation: https://learn.microsoft.com/en-us/azure/azure-functions/functions-event-grid-blob-trigger?pivots=programming-language-python I reproduce each step of this tutorial, and in local enviroment it work, but when I deploy the function and change de EVENT SUBSCRIPTION to the azure endpoint the event subscription is created, but imediatelly after created when I refesh the page it dissapears. In the images (from 1 to 3) the event created to local run, from images 4 to 6 the event created to run in production (azure cloud) where we can see it vanishing. I think that it is because this that the function do no trigger in the cloud.
my code and config:
init.py
import logging
import azure.functions as func
def main(myblob: func.InputStream):
print(f"TIPO: {type(myblob)}")
logging.info(f"Python blob trigger function processed blob \n"
f"Name: {myblob.name}\n"
f"Blob Size: {myblob.length} bytes")
function.json
{
"scriptFile": "__init__.py",
"bindings": [
{
"name": "myblob",
"type": "blobTrigger",
"direction": "in",
"path": "samples-workitems/{name}",
"source": "EventGrid",
"connection": "mvpblobpoc_STORAGE"
}
]
}
host.json
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.3.0, 4.0.0)"
},
"concurrency": {
"dynamicConcurrencyEnabled": true,
"snapshotPersistenceEnabled": true
}
}
Can anyone give a tip on how to solve this??