Soru

Zorluk: OrtaCreate and Configure Azure Functions

You are developing an Azure Function App (V4 runtime) that processes messages from an Azure Storage Queue. The processing logic for some messages can take up to 15 minutes to complete. The security policy requires that the Queue connection string must be stored securely in Azure Key Vault and must not be exposed in the application source code or settings files.

Which two configurations or actions should you implement to meet these requirements? (Select TWO.)

  1. Change the hosting plan of the Function App to a Premium or Dedicated (App Service) plan.Cevap
  2. Add an application setting in the Function App that references the Key Vault secret using the `@Microsoft.KeyVault(SecretUri=...)` syntax.Cevap
  3. C
    Keep the Consumption plan and configure the `functionTimeout` property in the `host.json` file to `00:15:00`.
  4. D
    Add a setting to the `host.json` file that references the Key Vault secret using the `@KeyVault(SecretUri=...)` syntax.

Cevap

To meet the requirements, you must change the hosting plan of the Function App to a Premium or Dedicated (App Service) plan, and add an application setting in the Function App that references the Key Vault secret using the `@Microsoft.KeyVault(SecretUri=...)` syntax.
Changing the hosting plan to a Premium or Dedicated plan is necessary because the Consumption plan has a maximum execution limit of 10 minutes, meaning a 15-minute execution would be terminated early. Furthermore, using a Key Vault reference in the Application Settings with the `@Microsoft.KeyVault(SecretUri=...)` syntax is the standard and secure way to inject secrets into the function configuration without exposing them in clear text.

Adım Adım Çözüm

1
Identify the hosting plan requirements based on execution duration.
The execution can take up to 15 minutes. The Consumption plan has a maximum limit of 10 minutes, so a Premium or Dedicated (App Service) plan is required.
Hosting plan limits dictate the maximum execution duration for Azure Functions.
2
Determine the secure method for referencing Key Vault secrets in application configurations.
Add an application setting in the Function App using the `@Microsoft.KeyVault` prefix and pointing to the Secret URI.
Key Vault references in Application Settings permit secure access to secrets at runtime without exposing credentials in code.

Anahtar Kavram

Hosting plans, timeout configurations, and Key Vault integration for Azure Functions.
Bu soruyu puanla