Learn the correct publish method, runtime stack, and version to use when deploying code written in an unsupported language to an Azure Function App production environment.
Table of Contents
Question
You are developing an Azure Function App. You develop code by using a language that is not supported by the Azure Function App host. The code language supports HTTP primitives.
You must deploy the code to a production Azure Function App environment.
You need to configure the app for deployment.
Which configuration values should you use? To answer, select the appropriate options in the answer area.
Publish:
- Code
- Docker Container
Runtime stack:
- Node.js
- Python
- PowerShell Core
- Custom Handler
Version:
- 14 LTS
- 7.0
- custom
Answer
To deploy code written in a language that is not natively supported by the Azure Function App host to a production environment, you should use the following configuration values:
Publish: Docker Container
Runtime stack: Custom Handler
Version: custom
Explanation
When your function app code is written in a language not directly supported by Azure Functions, you need to deploy it inside a Docker container using a custom handler. This allows you to run code in any language that supports HTTP primitives.
To do this, set the publish method to “Docker Container” rather than “Code”. This tells Azure Functions that your code will be deployed as a containerized app.
Next, specify “Custom Handler” as the runtime stack. Custom handlers act as an adapter between the Azure Functions host and your function app code written in a language not natively supported. It allows you to leverage the capabilities of Azure Functions while using your preferred programming language.
Finally, set the version to “custom” since you are not using one of the pre-defined language stacks and versions like Node.js 14 LTS, Python 3.7, PowerShell Core 7.0, etc. The custom version indicates you are bringing your own runtime via the custom handler in a container.
By configuring your function app with these settings – publishing as a Docker container, using a custom handler runtime stack, and specifying a custom version – you can successfully deploy and run code written in languages not normally supported by Azure Functions directly in a production environment. The container packages your custom runtime and code, while the custom handler interfaces it with the Azure Functions platform.
Microsoft AZ-204 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft AZ-204 exam and earn Microsoft AZ-204 certification.