I am struggling to understand the communication that the FunctionApp requires. Let's say I have a function app written in Python that during the runtime communicates with some public API. Besides that it does not need any internet access.
How I understand is that Function App to run requires communication with Storage Account. Both of those resources have their networking tabs, where we can set the option for "Public network access" to: a) Enabled from all networks b) Enabled from selected virtual networks and IP addresses c) Disabled
In the example setting provided Storage account and Function App do not need to be available from all networks. Is the public internet access needed for communication between them? How does the function app identity that can be turned on influences this workflow?
If you restrict access to the Function App and Storage Account by changing the Public network access setting to Enabled from selected virtual networks and IP addresses, you can specify which virtual networks and IP addresses are allowed to access your resources.
To establish communication between Function App and Storage Account:
Function App should be created with
Functions Premium or App Service Planto integrate with VNET.Storage Account=> Networkingand add the ClientIP in the firewall:Function App identity can be used to authenticate your Function App with Azure Key Vault or Azure Storage to improve the security of your application.
But I got 403 Forbidden error due to the access restrictions in the function app while accessing public API.
Function app=>Networkingin few Scenarios.I have created a Python Azure function to access a Public API (https://www.weatherapi.com) using below code.
References: