You are designing an Azure Function App that must process files uploaded to an Azure Blob Storage container. The requirements are as follows:
- The processing of each file can take up to 20 minutes to complete.
- The storage account is secured behind an Azure Virtual Network (VNet) and does not allow public internet access.
- The Function App must authenticate to the storage account using a user-assigned managed identity named `fn-storage-identity`.
- The solution must scale dynamically based on the volume of incoming uploads.
Which combination of hosting plan and connection settings should you configure?
- ADeploy the Function App on a Consumption plan. Set the application settings StorageConnection__blobServiceUri to the storage account blob endpoint, StorageConnection__credential to managedidentity, and StorageConnection__clientId to the client ID of fn-storage-identity.
- BDeploy the Function App on a Premium plan. Set the application settings StorageConnection__blobServiceUri to the storage account blob endpoint, StorageConnection__credential to managedidentity, and omit the client ID configuration.
- Deploy the Function App on a Premium plan. Set the application settings StorageConnection__blobServiceUri to the storage account blob endpoint, StorageConnection__credential to managedidentity, and StorageConnection__clientId to the client ID of fn-storage-identity.Cevap
- DDeploy the Function App on a Premium plan. Configure the connection setting StorageConnection to reference the storage account connection string stored in Azure Key Vault using the syntax @Microsoft.KeyVault(SecretUri=...) without configuring an access policy or Role-Based Access Control (RBAC) role for the Function App's identity on the Key Vault.
Cevap
Deploy the Function App on a Premium plan, and configure the connection settings using the blob service URI, the managedidentity credential, and the client ID of the user-assigned managed identity.
The correct configuration uses the Premium plan, which supports both virtual network integration (required to access the VNet-secured storage account) and execution durations longer than 10 minutes (the default is 30 minutes, and can be configured as unbounded). Additionally, for a user-assigned managed identity, configuring the Client ID parameter is mandatory to distinguish it from a system-assigned managed identity.
Adım Adım Çözüm
Anahtar Kavram
Azure Functions hosting plans and identity-based connection configuration for user-assigned managed identities.