Search⌘ K
AI Features

Deploying Azure Functions (AF)

Explore how to deploy Azure Functions by configuring your serverless.yml with dynamic prefixes, installing necessary dependencies like npm, and managing authentication via service principals using environment variables. Understand the step-by-step process to prepare and deploy Azure Functions smoothly with Serverless Framework and required plugins.

We'll cover the following...

Deploying functions

We’ll need to change a few entries in the serverless.yml file. Specifically, we’ll set the region, the Node.js version, the subscription ID, the resource group, and the prefix. Most of these should be self-explanatory, except the prefix.

When deploying Azure Functions without a custom domain, the URL to access them is auto-generated. The subdomain of azurewebsites.net uses a combination of a region, stage, and the function name. Since many developers are likely to use the same region and the same stage (dev), and azure-function is not an uncommon name, we run the risk of others using the same address. Even if no one else has come up with the brilliant idea to call it azure-function, other people taking this course will be following the same examples.

Since each function has to have a unique address, we’ll use the prefix field. But given the nature of the problem, it cannot ...