CHAPTER 02
Azure Free Tier and Billing Basics
Updated: May 15, 2026
15 min read
# CHAPTER 2
Azure Free Tier and Billing Basics
1. Introduction
The number one fear of every cloud computing beginner is the "Surprise Bill." We have all heard horror stories of a student waking up to a $5,000 invoice because they accidentally left a massive database running overnight. In Azure, billing is highly granular—you pay for compute cycles, network egress, and storage by the gigabyte. In this chapter, we will conquer this fear by mastering the Azure Cost Management dashboard, exploring the Free Services tier, and configuring automated budget alerts.2. Learning Objectives
By the end of this chapter, you will be able to:- Differentiate between the initial $200 Free Credit and "Always Free" services.
- Navigate the Cost Management + Billing dashboard.
- Understand the concept of Network Egress charges.
- Utilize the Azure Pricing Calculator to forecast infrastructure costs.
- Configure a Budget Alert to prevent unexpected charges.
3. Beginner-Friendly Explanation
Imagine a smartphone data plan.- The $200 Free Credit: Microsoft gives you a prepaid gift card with $200 on it. You can spend this on *almost anything* (expensive servers, massive databases) for 30 days. When it expires, your servers stop.
- Always Free Services: Your phone provider gives you 1GB of data free every month for the rest of your life. Azure does the same: they offer a specific list of tiny, low-power resources (like 10 web apps or serverless functions) you can use for free forever, as long as you stay under the limits.
- Budget Alerts: You tell your provider, "Send me a text message if my bill reaches $10." It doesn't turn off your phone, but it warns you before disaster strikes.
4. The Initial Credit vs. Always Free
When you sign up, your account has a "Spending Limit" of $0. This guarantees you will not be charged. You only use your $200 credit. If you manually remove the spending limit to become a "Pay-As-You-Go" customer, you still have access to Always Free services.Popular Always Free Services:
- Azure App Service (F1 Free Tier): Host up to 10 web apps.
- Azure Functions: 1 million serverless requests per month.
- Azure Cosmos DB: 1000 RU/s and 25GB of storage.
- Active Directory (Entra ID): Up to 50,000 objects.
5. Network Egress (The Hidden Cost)
Beginners understand they pay for servers and storage. They often forget they pay for *traffic*.- Ingress: Data coming *into* Azure (e.g., a user uploading a photo to your app). This is almost always FREE.
- Egress: Data leaving Azure to the internet (e.g., a user downloading a 1GB video from your server). You pay for this (the first 100GB/month is usually free, then it costs money per GB).
6. The Azure Pricing Calculator
Before deploying a massive architecture, professionals use the Azure Pricing Calculator. You search for your desired resources (e.g., "3 Virtual Machines, 100GB of storage, running 24/7 in East US"), and the calculator provides a highly accurate monthly cost estimate, preventing architectural mistakes before they happen.7. Mini Project: Configure a Budget Alert
Let's guarantee you never get a surprise bill.Step-by-Step Tutorial:
-
1.
Open the Azure Portal (
portal.azure.com).
- 2. In the top search bar, type Cost Management + Billing and click it.
- 3. Select your billing scope (usually your subscription name, like "Azure subscription 1").
- 4. In the left navigation menu under Cost Management, click Budgets.
- 5. Click + Add.
-
6.
Name:
My $10 Safety Net.
- 7. Reset period: Billing month.
-
8.
Amount: Type
10. Click Next.
- 9. Under Set alerts, configure the thresholds:
-
Type:
Actual| % of budget:50| Value:$5
-
Type:
Actual| % of budget:90| Value:$9
-
Type:
Actual| % of budget:100| Value:$10
- 10. Action group / Alert recipients: Enter your personal email address.
- 11. Click Create. If your bill ever hits $5, Microsoft will instantly email you so you can log in and delete your running resources!
8. Real-World Scenarios
A startup launches a new photo-sharing app hosted on Azure. A famous influencer tweets about the app, and suddenly 100,000 people download a 5MB photo simultaneously. While the startup's servers handle the compute load fine, at the end of the month, they receive a massive bill for 500GB of "Bandwidth/Egress" traffic. To optimize this, they later implement Azure Front Door (a CDN) to cache the images closer to users, drastically reducing egress costs.9. Best Practices
-
Resource Tagging: Enterprise companies use "Tags". A tag is a simple Key-Value pair (e.g.,
Department : MarketingorEnvironment : Production). You attach tags to your Virtual Machines. At the end of the month, the Finance department uses Cost Management to instantly see that the Marketing department spent $5,000, while the HR department only spent $500.
10. Cost Optimization Tips
- Deallocate vs. Stop: If you click "Shut down" from inside a Windows Virtual Machine, the OS stops, but Azure still reserves the hardware, so *you are still billed for the compute power!* You must click Stop from the Azure Portal to completely Deallocate the VM. When Deallocated, you stop paying for the CPU and RAM (you only pay pennies for the hard drive storage).
11. CLI Examples
To view your current billing invoices via terminal:
bash
12. Exercises
- 1. Does an Azure Budget Alert automatically shut down your servers if the threshold is reached?
- 2. Explain the pricing difference between Ingress network traffic and Egress network traffic.
13. FAQs
Q: Can I set a hard cap to literally turn off my servers if I hit $10? A: Not directly with the basic Budgets UI. Budget Alerts only send emails. To create a "Hard Cap" that physically shuts down servers, you have to attach an "Action Group" to the budget alert that triggers an Azure Automation Runbook or Azure Function to programmatically delete resources.14. Interview Questions
- Q: Describe the architectural process of establishing granular cost allocation across multiple engineering teams within a single Azure Subscription.
- Q: A client complains that their Azure bill is unexpectedly high, despite utilizing relatively few compute resources. Detail your troubleshooting methodology to identify the hidden cost drivers, specifically focusing on network topologies.