Azure Function with Blob Trigger to trigger indexing documents into Azure AI Search from Blob Storage.
Select option 1 or 2 based on your scenario.
-
Access the blob container by
Access key- The value assigned to
connection="AzureWebJobsStorage"should be updated to the production connection string if you used Azurelite locally.
- The value assigned to
-
Access the blob container by
Managed IdentityEnsure the following Azure roles are assigned to the identity running the function:
- Naviagte to Storage Account IAM.
- Assign Storage Blob Data Owner and Storage Queue Data Contributor to the function.
- Added environment variables with ServiceUri as postfix to the function:
<CONNECTION_NAME_PREFIX>__blobServiceUri&<CONNECTION_NAME_PREFIX>__queueServiceUri. The sample usesAZURE_SEARCH_STORAGEas the value for<CONNECTION_NAME_PREFIX>. - π€ Despite of settings, it still requires enabling
Allow storage account key access: Singleton lock renewal failed for blob '.../host' with error code 403: KeyBasedAuthenticationNotPermitted.
Use the Azure Functions Core Tools to publish your Python function app:
func azure functionapp publish <your-func-app-name> --python