Creating an Azure App Service
Step-by-step guide to creating an Azure App Service web app — runtimes, deployment types, key features, and how to connect CI/CD pipelines.
What Is an Azure App Service?
Azure App Service is a PaaS service for hosting web applications, REST APIs, and backend services. You deploy your code; Azure manages the infrastructure.
Key idea: You focus on the application, not on servers, OS patching, or load balancers.
Core Components
| Component | Role |
|---|---|
| App Service | The actual application instance running your code |
| App Service Plan | Defines compute, memory, networking, and pricing tier |
Think of it as: App Service Plan = Infrastructure, App Service = Application.
Default Public URL
Every new App Service automatically gets a globally unique public URL:
https://<app-name>.azurewebsites.net
The name must be globally unique across all of Azure.
Creating an App Service — Step by Step
Step 1: Choose a Publish Type
| Type | Description |
|---|---|
| Code | Deploy source code directly (most common) |
| Docker container | Run a containerized application |
| Static Web App | Frontend-only hosting for SPAs and static sites |
Step 2: Choose a Runtime
Supported runtimes on Linux and Windows:
- Python, Node.js, .NET, Java, PHP, Ruby
Linux is required for Python apps. Windows supports .NET and others.
Step 3: Assign an App Service Plan
- Select an existing plan or let Azure create a new one
- The plan determines CPU, memory, and available features
- All apps on a plan share its resources
Step 4: Configure Deployment (Optional at Creation)
- Set up CI/CD with GitHub Actions, Azure DevOps, Bitbucket, Local Git, or external Git
- Can be configured later via Deployment Center
Step 5: Configure Networking
- Public access enabled by default
- Can disable public access or enable VNet injection at creation
Key Features
Managed Infrastructure
- No server management, patching, or configuration
- Fully abstracted PaaS — you only manage application code
Auto Scaling
- Scale up → increase VM size (tier change)
- Scale out → add more instances to handle traffic
High Availability
- Multiple instances automatically load-balanced
- Built-in redundancy across the scale unit
Deployment Slots (Important for Exams)
Deployment slots allow you to run multiple versions of your app simultaneously:
- Production slot — live traffic
- Staging slot — test new version safely
- Swap — instantly swap staging → production with zero downtime
- Rollback — swap back immediately if issues occur
Available on Standard tier and above.
Integration Capabilities
- Microsoft Entra ID — built-in authentication
- Virtual Network — connect outbound to private resources
- On-premises — hybrid connectivity via VNet or hybrid connections
Networking Explained
| Scenario | How |
|---|---|
| Default | Public internet access via azurewebsites.net |
| VNet Integration | Outbound access to resources inside a VNet |
| App Service Environment (ASE) | Full VNet isolation (Isolated tier only) |
| Private Endpoint | Inbound private-only access via VNet IP |
Regular App Service with VNet integration is not the same as running inside a VNet — it only provides outbound routing to VNet resources.
Deployment Options
From the Deployment Center in the Azure Portal, you can configure:
| Source | Description |
|---|---|
| GitHub | Auto-deploy via GitHub Actions |
| Azure DevOps | Pipeline-based deployment |
| Bitbucket | Branch-based deployment |
| Local Git | Push code via Git from your machine |
| External Git | Public or private Git repo |
Portal Walkthrough Summary
- Go to Azure Portal → search Web App → click Create
- Enter a globally unique name (this becomes the
.azurewebsites.netURL) - Choose Publish type (Code / Docker / Static Web App)
- Select Runtime stack (e.g. Python 3.12, .NET, Node.js)
- Choose OS (Linux or Windows)
- Select Region
- Assign or create an App Service Plan (with pricing tier)
- Optionally configure Deployment (CI/CD), Networking, Monitoring
- Click Review + Create → Create
After deployment, your app is accessible at the default URL. From the app blade you can:
- Deployment Center — connect a code source
- Scale up / Scale out — adjust resources
- Custom domains — attach your own domain
- Deployment slots — manage staging/production versions
- Networking — configure VNet integration or private endpoints
App Service vs. VMs
| Aspect | App Service | Virtual Machine |
|---|---|---|
| Infra management | Azure-managed | You manage |
| Patching | Automatic | Manual |
| Deployment | Code/container | You configure everything |
| Scaling | Built-in | Manual or VMSS |
| Best for | Web apps and APIs | Full control, legacy apps |
Key Exam Takeaways
- Every App Service gets a
*.azurewebsites.netURL that must be globally unique - Publish types: Code, Docker container, Static Web App
- App Service Plan = infrastructure; App Service = application
- Deployment slots require Standard tier or above
- Swap = instant blue-green deployment; rollback by swapping back
- VNet integration = outbound connection (not hosting inside VNet)
- ASE = full VNet hosting (Isolated tier only)
Reference Documentation
- Azure App Service overview
- Create an App Service app
- Continuous deployment to App Service
- Scale up an App Service app
- App Service networking features
- Deployment slots
Hands-on: Create an App Service Web App
Goal: Deploy a basic web app and practice common AZ-104 operations.
- Create an App Service Plan named
az104-app-plan. - Choose Linux or Windows based on the runtime you want to practice.
- Create a Web App named
az104-webapp-<unique>. - Select a runtime stack such as Node, Python, .NET, or PHP.
- Browse to the default
*.azurewebsites.netURL. - Open Configuration > Application settings and add
ENVIRONMENT = lab. - Open Deployment Center and configure a simple GitHub or local Git deployment if available.
- Open Scale up and review which features require Basic, Standard, or Premium tiers.
- Enable diagnostic logs for application and web server logs.
- Stream logs while making a request to the app.
Hands-on: Deployment Slot Swap
- Scale the App Service Plan to Standard or higher.
- Create a deployment slot named
staging. - Deploy a visibly different version to
staging. - Open the staging URL and validate it.
- Choose Swap from staging to production.
- Confirm production now serves the staging version.
- Swap back to practice rollback.
