I have recently started reading about Azure Functions so decided to give it a go.
I created a test Azure Function in Visual Code using Python, which should fire off a trigger when a blob has been uploaded to the specified container but for some reason I am getting this error below:
2021-01-14T11:27:32Z [Error] Executed 'Functions.TestBlobTrigger' (Failed, Id=dfd0dd15-d937-486d-b6f3-1634745ff14d, Duration=37ms)
To provide more context, this is my function.json file:
{
"scriptFile": "__init__.py",
"bindings": [
{
"name": "myblob",
"type": "blobTrigger",
"direction": "in",
"path": "root/test",
"connection": "AzureWebJobsStorage"
}
]
}
This is my _init_.py file:
import logging
import azure.functions as func
def main(myblob: func.InputStream):
logging.info(f"Python blob trigger function processed blob \n"
f"Name: {myblob.name}\n"
f"Blob Size: {myblob.length} bytes")
And finally this is my local.settings.json file:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=XXXX;AccountKey=XXXX;EndpointSuffix=core.windows.net",
"FUNCTIONS_WORKER_RUNTIME": "python"
}
}
I'd appreciate any tips in order to guide me in the right direction.