Hello @Lohit K M
I cannot speak for all scenarios, but issue I have had in the past include:
- The issue could be because the application setting should be WEBSITE_RUN_FROM_PACKAGE (Issue 1041).
- Another consideration could be that because you are deploying a package, you need to include all the dependencies in your package. Therefore, you will need to build application before the function deployment. Read through this page to understand how to deploy as a package. https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package
- My understanding is that you shouldn't be setting SCM_DO_BUILD_DURING_DEPLOYMENT, ENABLE_ORYX_BUILD
If your project needs to use remote build, don't use the WEBSITE_RUN_FROM_PACKAGE app setting. Instead add the SCM_DO_BUILD_DURING_DEPLOYMENT=true deployment customization app setting. For Linux, also add the ENABLE_ORYX_BUILD=true setting.
I've used this function in the past as a template for my python deployments. https://github.com/Azure/Azure-Sentinel/tree/master/DataConnectors/AWS-S3-AzureFunction
I hope this helps provide you with the information you need. If it does, please make sure to mark the question as answered so it helps other people in future.
Kind regards
Alistair