How To Deploy Function App In Azure Portal

Today, I’m going to walk you through the process of deploying an Azure Function App directly within the Azure Portal. We will cover everything from initial setup to choosing the right hosting plan, ensuring your deployment is seamless and cost-effective.

How To Deploy Function App In Azure Portal

An Azure Function App is the container that hosts your individual functions. Think of it as the “logic home.” It provides the execution context, environment variables, and scaling rules for your code.

In the world of serverless, you only pay for what you use. This “event-driven” model means your code stays dormant until a specific trigger—like an HTTP request or a message in a queue—wakes it up.

Why Deploy via the Azure Portal?

While many enterprise environments use CI/CD pipelines (like GitHub Actions or Azure DevOps), the Azure Portal remains the gold standard for:

  • Prototyping: Quickly testing a concept without setting up a repository.
  • Learning: Seeing the underlying infrastructure and how services connect.
  • Small-Scale Projects: Simple automation tasks that don’t require complex overhead.

Step 1: Laying the Groundwork (Prerequisites)

To follow along with this tutorial, you’ll need a few basics in place:

  1. An Active Azure Subscription: If you don’t have one, Microsoft offers a free tier for 12 months with a $200 credit.
  2. A Resource Group: This is a logical folder where all your Azure assets live. I usually name mine something like rg-product-dev-eastus.
  3. A Storage Account: Azure Functions require a storage account for internal operations like managing triggers and logging function executions.

Step 2: Creating the Function App Resource

Let’s dive into the portal. Head over to portal.azure.com and sign in.

  1. Search and Select: In the top search bar, type “Function App” and select it from the services list.
  2. Start the Wizard: Click the + Create button.
  3. The Basics Tab: This is where we define all the details of our app. Check out the screenshot below for your reference.

Key Configuration Settings

SettingRecommendationDescription
SubscriptionSelect your primaryThe account billed for resources.
Resource Grouprg-serverless-usaUse an existing one or create a new one.
Function App Namefunc-orderprocessor-01Must be globally unique (e.g., ends in .azurewebsites.net).
PublishCodeChoose “Code” for most scenarios (Docker is for containers).
Runtime Stack.NET / Python / Node.jsPick the language you are most comfortable with.
VersionLatest (e.g., .NET 8 LTS)Always aim for Long Term Support (LTS) versions.
RegionEast US or West USChoose the region closest to your end users.

Pro Tip: In the USA, East US and West US 2 are often the most feature-rich regions with the lowest latency for domestic traffic.

How To Deploy Function App In Azure Portal

Step 3: Selecting the Right Hosting Plan

This is the step where most beginners get stuck. Azure offers different hosting models, and choosing the wrong one can lead to “cold starts” or unexpected bills.

1. Consumption Plan (Serverless)

This is the “true” serverless experience. You are billed based on the number of executions and memory usage.

  • Best for: Variable workloads, low-cost projects, and apps that can tolerate a slight delay (cold start) after being idle.

2. Premium Plan (Elastic Premium)

This plan keeps your functions “warm” to eliminate cold starts and allows for VNet integration.

  • Best for: Enterprise apps requiring high performance and enhanced security.

3. Dedicated (App Service) Plan

You run your functions on dedicated VMs.

  • Best for: If you already have an App Service running other web apps and have spare capacity.

4. Flex Consumption (New)

The latest tier that combines the best of Consumption and Premium, offering fast scaling and more deterministic behavior.

Step 4: Networking and Monitoring

After picking your plan, you’ll see tabs for Hosting, Networking, and Monitoring.

Hosting & Storage

Azure will automatically suggest a storage account. If you are in a production environment, I recommend creating a dedicated storage account to avoid performance bottlenecks shared with other apps.

Deploy Function App Azure Portal

Monitoring with Application Insights

Enable this! I cannot stress this enough. Application Insights is your “black box” flight recorder. It logs every failure, every slow request, and every system exception. Without it, debugging a serverless function is like trying to find a needle in a dark room.

Deploy Function App in Azure Portal

Step 5: Review and Create

Once you’ve filled out the details:

  1. Click Review + Create.
  2. Azure will run a validation check. If it passes, click Create.
  3. Wait about 2-3 minutes for the deployment to finish. You’ll see a “Your deployment is complete” message.
How To Deploy Function App In Portal

Step 6: Creating Your First Function (The “Hello World”)

Now that the “container” is ready, we need to put some code in it.

  1. Go to your new Function App resource.
  2. In the left-hand menu, click on Functions.
  3. Click + Create.
  4. Select a Template: I recommend starting with the HTTP Trigger. It’s the easiest to test.
  5. Authorization Level: Set this to “Function” or “Anonymous” for testing. “Function” requires a key to call the API, which is safer.

Understanding Triggers and Bindings

This is the “secret sauce” of Azure Functions.

  • Triggers: What makes the code run? (HTTP, Timer, Blob Storage).
  • Input Bindings: Data the function reads before starting.
  • Output Bindings: Where the function sends data when finished (e.g., writing to a SQL Database or a Queue).

Best Practices

When I consult for firms in tech hubs like Austin or Seattle, I always emphasize these three pillars of Azure deployment:

1. Naming Conventions

Don’t just name things “test.” Use a structured format:

[Service]-[Environment]-[Region]-[Instance]

Example: func-billing-prod-westus-001

2. Use Tags

Tags are metadata that help you track costs. Tag your resources by:

  • Department: Finance, Engineering, Marketing.
  • Environment: Production, Staging, Dev.
  • Owner: John Doe.

3. Security First

Never hardcode connection strings in your code. Use the Configuration section under “Settings” to store your secrets as Environment Variables, or better yet, link them to Azure Key Vault.

Troubleshooting Common Issues

Even the best of us run into walls. Here are the top three issues I see when deploying via the portal:

  • Deployment Failures: Usually caused by a name conflict or reaching a quota limit in your subscription.
  • 401 Unauthorized: You’re likely trying to call your function without the x-functions-key header.
  • Storage Account Errors: Ensure your storage account and function app are in the same region. Cross-region communication adds latency and costs.

Conclusion

Deploying an Azure Function App via the portal is an empowering experience. It strips away the complexity of server management and lets you focus on what really matters: writing great code. By following this guide, you’ve not only deployed a function but also set the stage for a scalable, professional-grade cloud architecture.

You may also like the following articles:

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!