Module 8: App Services and Serverless

Module 8Level 3Azure Administrator

App Services and Serverless

Modern hosting for Snips applications·45 minutes

Azure App Service plansWeb Apps: deployment and configurationDeployment slotsApp Service networkingAzure Functions overview+3 more
The situation

Modern hosting for Snips applications

The Applications team has built a new internal API for the Snips housing management system. They do not want to manage a virtual machine — they want to deploy code and let Azure handle the infrastructure. You need to evaluate App Service and Azure Functions and recommend the right hosting model.

PaaS hosting is increasingly the default choice for new applications. Understanding when to use App Service versus Functions versus VMs is a core skill for an Azure Administrator.

What you will learn

Azure App Service plans
Web Apps: deployment and configuration
Deployment slots
App Service networking
Azure Functions overview
Managed identities with App Service
Application settings and connection strings
Scaling App Service

Azure App Service

Azure App Service is a fully managed PaaS platform for hosting web applications, REST APIs and mobile backends. You deploy your code; Azure manages the OS, runtime, patching and scaling infrastructure.

App Service Plan

Defines the region, number of VM instances, and pricing tier. Multiple apps can share one plan. The plan is what you pay for, not the individual apps.

Web App

The actual application hosted within an App Service Plan. Supports .NET, Node.js, Python, Java, PHP and custom containers.

Deployment slot

A separate instance of your app (e.g. staging) that can be swapped into production with zero downtime. Settings can be slot-specific or shared.

Scale out

Adding more instances of the App Service Plan to handle increased load. Standard tier and above support autoscaling based on metrics.

App Service Plan tiers

The tier you choose determines which features are available. Click a row to see the recommended use case.

TierAutoscaleSlotsCustom domain
Free / SharedNo0No
BasicNo0Yes
StandardYes5Yes
PremiumYes20Yes
For the Snips internal API, Standard S1 is the right starting point. It supports autoscaling (important for morning traffic spikes), deployment slots (for safe deployments) and custom domains. You can scale up to Premium if VNet integration is needed.

Deployment slots

Deployment slots are one of the most valuable App Service features. They allow you to deploy and test a new version of your application in a staging environment before exposing it to production users.

Slot swap

Swaps the staging and production slots. The swap is near-instantaneous from the user's perspective. If problems are found, you can swap back.

Slot-specific settings

Application settings and connection strings can be marked as slot-specific, so they stay with the slot during a swap. Use this for environment-specific connection strings.

Auto-swap

Automatically swaps a slot into production after a successful deployment. Useful for continuous deployment pipelines.

Azure Functions

Azure Functions is a serverless compute service that runs small pieces of code (functions) in response to events. You pay only for the time your code runs — there is no idle cost on the Consumption plan.

HTTP trigger

Runs the function in response to an HTTP request. Ideal for APIs and webhooks.

Timer trigger

Runs the function on a schedule defined by a CRON expression. Ideal for nightly batch jobs.

Blob trigger

Runs when a blob is created or modified in a storage container. Ideal for processing uploaded files.

Queue trigger

Runs when a message is added to a storage queue. Ideal for background processing and decoupling services.

The Consumption plan has a cold start delay — the first request after a period of inactivity takes longer as Azure spins up an instance. For latency-sensitive APIs, consider the Premium plan which keeps instances warm.

Managed identities

Managed identities eliminate the need to store credentials in code or configuration. Azure automatically manages the identity and its credentials.

System-assigned identity

Tied to the lifecycle of the resource. Created and deleted with the resource. One resource, one identity.

User-assigned identity

Created as a standalone resource and assigned to one or more services. Useful when multiple services need the same permissions.

Always use managed identities instead of storing connection strings or API keys in application settings. Grant the identity the minimum RBAC role needed — for example, Storage Blob Data Reader rather than Storage Account Contributor.

App Service CLI commands

bash
# Create an App Service Plan (Standard tier)
az appservice plan create \
  --name asp-snips-internal-prod-uks-001 \
  --resource-group rg-appservice-prod-uks-001 \
  --location uksouth \
  --sku S1 \
  --is-linux

# Create a Web App
az webapp create \
  --name app-snips-internalapi-prod-001 \
  --resource-group rg-appservice-prod-uks-001 \
  --plan asp-snips-internal-prod-uks-001 \
  --runtime "NODE:20-lts"

# Create a staging deployment slot
az webapp deployment slot create \
  --name app-snips-internalapi-prod-001 \
  --resource-group rg-appservice-prod-uks-001 \
  --slot staging

# Swap staging to production
az webapp deployment slot swap \
  --name app-snips-internalapi-prod-001 \
  --resource-group rg-appservice-prod-uks-001 \
  --slot staging \
  --target-slot production

# Assign a managed identity
az webapp identity assign \
  --name app-snips-internalapi-prod-001 \
  --resource-group rg-appservice-prod-uks-001
Hands-on lab: Deploy the Snips internal API
  1. 1.Create a Standard S1 App Service Plan in UK South.
  2. 2.Create a Web App and deploy a simple "Hello World" application.
  3. 3.Create a staging deployment slot and deploy a different version to it.
  4. 4.Swap the staging slot into production and verify the change.
  5. 5.Assign a system-assigned managed identity to the Web App.
  6. 6.Create an Azure Function with a Timer trigger that runs every 5 minutes.

1.The Applications team wants to deploy a web API without managing the underlying OS or patching. Which Azure service is most appropriate?

2.Snips wants to test a new version of the internal API before routing production traffic to it. Which App Service feature enables this with zero downtime?

3.An Azure Function needs to read from a storage account without storing credentials in code. What is the recommended approach?

4.The internal API experiences traffic spikes every morning. You want it to scale out automatically. Which App Service Plan tier supports autoscaling?

5.Which Azure Functions trigger type would you use to run a function automatically every night at midnight?

Module summary

The Snips internal API is running on App Service with a staging slot for safe deployments and a managed identity for secure access to storage. You understand when to use App Service versus Functions and how to choose the right plan tier for your workload.

Ready to mark this module complete?

Mark complete when you have read all sections, attempted the lab and completed the knowledge check.

AZ-104 objectives covered
  • Deploy and manage Azure compute resources