0Pricing
Cloud & IT Cert Prep · Lesson

Creating an App Service Plan and Web App

Provision an App Service plan, understand SKU tiers, and deploy a web application from a ZIP file or GitHub repository using continuous deployment.

Creating an App Service Plan and Web App is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What Is Azure App Service?

Azure App Service is a fully managed Platform as a Service (PaaS) for hosting web applications, REST APIs, and mobile backends. You deploy your code and Azure handles OS patching, load balancing, and auto-scaling of the underlying infrastructure. App Service supports .NET, Node.js, Python, Java, PHP, Ruby, and custom containers, making it one of the most versatile compute services in Azure.

App Service Plan: The Billing Unit

An App Service plan defines the region, OS (Windows or Linux), and compute resources (CPU, RAM) allocated to your apps. You pay for the plan, not individual apps — multiple apps can share the same plan at no extra cost. The plan's SKU tier determines features like the number of deployment slots, autoscaling capability, and VNet integration support.

# Create an App Service Plan (Linux, Standard S1 tier)
az appservice plan create \
  --name MyAppServicePlan \
  --resource-group MyRG \
  --location eastus \
  --sku S1 \
  --is-linux

App Service Plan SKU Tiers

App Service plans come in several tiers with increasing capability and cost. Free (F1) and Shared (D1) run on shared infrastructure and are for development only. Basic (B1-B3) provides dedicated compute without autoscaling or slots. Standard (S1-S3) adds autoscaling and 5 deployment slots. Premium (P1-P3v3) offers more compute and VNet integration. Isolated (I1-I3) runs in a private dedicated environment.

# App Service Plan tiers (ordered by capability)
# Free:     F1  — shared, 60 min/day compute
# Shared:   D1  — shared, custom domain support
# Basic:    B1, B2, B3 — dedicated, no autoscale
# Standard: S1, S2, S3 — autoscale, 5 slots
# Premium:  P1v3, P2v3, P3v3 — VNet integration
# Isolated: I1v2, I2v2 — App Service Environment (ASE)

Creating a Web App

A Web App is an individual application hosted within an App Service plan. Each web app gets a unique default hostname of the form <appname>.azurewebsites.net. You specify the runtime stack (e.g., NODE:18-lts or DOTNET:7.0) when creating the app, though you can update it later without redeployment.

# Create a Node.js Web App on the Linux plan
az webapp create \
  --name MyUniqueWebApp \
  --resource-group MyRG \
  --plan MyAppServicePlan \
  --runtime 'NODE:18-lts'

# Access the app
# https://MyUniqueWebApp.azurewebsites.net

Deploying Code to App Service

App Service supports several deployment methods. ZIP deploy is the simplest — package your app and push the ZIP file. Git deploy connects to a Git repository and builds on push. GitHub Actions and Azure Pipelines are the recommended CI/CD integrations. You can also deploy a Docker container image from Azure Container Registry or any public registry.

# Deploy a ZIP package
zip -r app.zip . --exclude '.git/*' --exclude 'node_modules/*'
az webapp deploy \
  --name MyUniqueWebApp \
  --resource-group MyRG \
  --src-path app.zip

# Configure deployment from GitHub
az webapp deployment source config \
  --name MyUniqueWebApp \
  --resource-group MyRG \
  --repo-url https://github.com/myorg/myrepo \
  --branch main \
  --manual-integration

Application Settings and Environment Variables

App Service exposes application settings as environment variables to your app code. This is the recommended way to inject configuration such as database connection strings, API keys, and feature flags without hardcoding them. Settings are encrypted at rest and can reference Azure Key Vault secrets using a Key Vault reference string, eliminating the need to store secrets in the portal.

# Set application settings
az webapp config appsettings set \
  --name MyUniqueWebApp \
  --resource-group MyRG \
  --settings \
    NODE_ENV=production \
    DATABASE_URL='@Microsoft.KeyVault(SecretUri=https://mykv.vault.azure.net/secrets/dburl/)'

# View current settings
az webapp config appsettings list \
  --name MyUniqueWebApp \
  --resource-group MyRG

Always On and Health Checks

By default, App Service unloads an app after a period of inactivity. Enable Always On (Standard tier and above) to keep the application loaded at all times, which is important for background jobs and APIs that need fast cold-start responses. The health check feature pings a URL you define and removes unhealthy instances from the load balancer, enabling automatic instance replacement.

# Enable Always On
az webapp config set \
  --name MyUniqueWebApp \
  --resource-group MyRG \
  --always-on true

# Configure health check endpoint
az webapp config set \
  --name MyUniqueWebApp \
  --resource-group MyRG \
  --generic-configurations '{"healthCheckPath": "/health"}'

App Service Logs and Diagnostics

App Service provides built-in logging for application logs (stdout/stderr from your code), web server logs (HTTP access logs), and deployment logs. You can stream logs in real time using the Azure CLI or enable log storage in Blob Storage. Enable Application Insights for distributed tracing and performance monitoring across the full request lifecycle.

# Enable application logging to file system
az webapp log config \
  --name MyUniqueWebApp \
  --resource-group MyRG \
  --application-logging filesystem \
  --level information

# Tail logs in real time
az webapp log tail \
  --name MyUniqueWebApp \
  --resource-group MyRG

Scaling App Service Manually

You can scale App Service up (to a larger SKU with more CPU/RAM) or out (add more instances). Manual scale-out increases the instance count immediately and is available from Basic tier upward. Scaling up to a higher tier enables additional features like deployment slots and VNet integration without service interruption — the app restarts briefly during the SKU change.

# Scale out: increase instance count to 3
az appservice plan update \
  --name MyAppServicePlan \
  --resource-group MyRG \
  --number-of-workers 3

# Scale up: upgrade from S1 to P2v3
az appservice plan update \
  --name MyAppServicePlan \
  --resource-group MyRG \
  --sku P2V3

Monitoring in the Azure Portal

The App Service Overview blade shows real-time graphs for requests, response time, data in/out, and error rates. The Diagnose and solve problems blade runs automated detectors for common issues. The Metrics tab lets you pin custom charts and set alert rules. Integrate with Application Insights for end-to-end request tracing and dependency maps across your entire application stack.

# View recent HTTP metrics via CLI
az monitor metrics list \
  --resource '/subscriptions/<sub>/resourceGroups/MyRG/providers/Microsoft.Web/sites/MyUniqueWebApp' \
  --metric 'Requests,Http5xx,AverageResponseTime' \
  --interval PT1M \
  --start-time 2025-01-01T00:00:00Z \
  --end-time 2025-01-01T01:00:00Z

App Service Pricing Strategies

Optimise App Service costs by consolidating multiple apps onto a single plan when they have compatible resource needs, using the Free tier for dev and test environments, and applying Azure Reservations (1- or 3-year commitment) for predictable production workloads to save up to 55%. Auto-scaling (covered in the next lesson) ensures you are not paying for idle instances during off-peak hours.

Quick Check

Test your understanding of Microsoft Azure Fundamentals (AZ-900) concepts from this lesson.

Lesson Recap

In this lesson you learned: an App Service plan defines the compute tier and billing unit for your web apps, you can deploy code via ZIP, Git, or CI/CD pipelines, and application settings inject configuration as environment variables without hardcoding secrets. Next up we explore deployment slots for zero-downtime releases.

Frequently asked questions

Is the “Creating an App Service Plan and Web App” lesson free?

Yes — the full text of “Creating an App Service Plan and Web App” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.

What will I learn in “Creating an App Service Plan and Web App”?

Provision an App Service plan, understand SKU tiers, and deploy a web application from a ZIP file or GitHub repository using continuous deployment. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cloud & IT Cert Prep?

No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Creating an App Service Plan and Web App” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cloud & IT Cert Prep lesson?

Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Creating an App Service Plan and Web App
  2. Deployment Slots and Swap
  3. Autoscaling and Custom Domains
  4. App Service Authentication and Networking
← Back to Cloud & IT Cert Prep