Cost Management
Cloud costs grow quickly without visibility and discipline. Azure Cost Management + Billing provides the tools to understand, allocate, and optimize spending across subscriptions and resource groups.
Cost Management Overview
Section titled “Cost Management Overview”| Tool | What It Does | AWS Equivalent |
|---|---|---|
| Cost Analysis | Explore costs with charts and filters | Cost Explorer |
| Budgets | Set spending limits with alerts | AWS Budgets |
| Advisor (cost) | Right-sizing and idle resource recommendations | Trusted Advisor |
| Pricing Calculator | Estimate costs before deploying | AWS Pricing Calculator |
| Azure Reservations | Pre-pay for 1/3 year discounts | Savings Plans / Reserved Instances |
Cost Analysis
Section titled “Cost Analysis”Cost Analysis is the primary tool for exploring your Azure spending:
Filter by: ├── Subscription ├── Resource group ├── Service name (e.g. Virtual Machines, Storage) ├── Location ├── Tag (e.g. Environment=production) └── Time range
View as: ├── Accumulated cost (running total) ├── Daily cost (bar chart) ├── Cost by service ├── Cost by resource group └── Cost by tagCommon Views
Section titled “Common Views”| View | Question It Answers |
|---|---|
| Cost by service | Which Azure services cost the most? |
| Cost by resource group | Which teams or applications spend the most? |
| Cost by tag | How much does each environment (prod/dev) cost? |
| Daily cost | Is spending trending up or down? |
| Forecast | What will this month’s bill be? |
Azure CLI Cost Query
Section titled “Azure CLI Cost Query”# View cost for the current month by resource groupaz costmanagement query \ --type ActualCost \ --scope "subscriptions/<subscription-id>" \ --timeframe MonthToDate \ --dataset-grouping name="ResourceGroup" type="Dimension"Budgets
Section titled “Budgets”Budgets alert you (and optionally take action) when spending reaches thresholds:
# Create a monthly budget of $5,000az consumption budget create \ --budget-name "monthly-limit" \ --amount 5000 \ --time-grain Monthly \ --start-date 2026-02-01 \ --end-date 2027-01-31 \ --resource-group myapp-prod-rg
# Alert thresholds are configured in the portal or ARM/BicepBudget Alert Thresholds
Section titled “Budget Alert Thresholds”| Threshold | Typical Action |
|---|---|
| 50% | Informational email to the team |
| 80% | Warning email to team leads |
| 100% | Alert to finance and engineering managers |
| 120% (forecast) | Trigger automation (e.g. stop non-critical VMs) |
Budget Actions
Section titled “Budget Actions”Budgets can trigger action groups that:
- Send email/SMS notifications.
- Call a webhook.
- Trigger an Azure Function or Logic App (e.g. to shut down dev VMs).
Tagging for Cost Attribution
Section titled “Tagging for Cost Attribution”Tags are the foundation of cost management — without them, you can’t attribute costs to teams, applications, or environments.
Recommended Tags
Section titled “Recommended Tags”| Tag | Purpose | Example Values |
|---|---|---|
Environment | Separate prod vs dev costs | production, staging, development |
Team | Owning team | platform, backend, data |
CostCenter | Finance cost center | CC-1234, engineering |
Application | Application name | web-portal, api-service |
ManagedBy | IaC tool | terraform, bicep, manual |
Enforcing Tags
Section titled “Enforcing Tags”Use Azure Policy to enforce required tags — deny resource creation if tags are missing.
Cost Analysis by Tag
Section titled “Cost Analysis by Tag”Once tags are applied, filter Cost Analysis by tag:
Cost by tag: Environment production $12,500 (72%) staging $2,800 (16%) development $2,100 (12%) ────────────────────── Total $17,400Azure Advisor (Cost Recommendations)
Section titled “Azure Advisor (Cost Recommendations)”Azure Advisor automatically detects optimization opportunities:
| Recommendation | What It Finds |
|---|---|
| Right-size VMs | VMs with <5% average CPU — downsize or shut down |
| Shut down unused VMs | VMs running but with no network/disk activity |
| Delete unattached disks | Managed disks not attached to any VM |
| Use Reserved Instances | Steady-state VMs that would save with 1/3-year commit |
| Switch to cheaper storage tiers | Blob data that hasn’t been accessed (move to Cool/Archive) |
| Delete unused public IPs | Static public IPs not associated with any resource |
# View cost recommendationsaz advisor recommendation list --category CostAzure Reservations and Savings Plans
Section titled “Azure Reservations and Savings Plans”Reservations
Section titled “Reservations”Pre-pay for a specific resource type and size for 1 or 3 years:
| Resource | 1-Year Discount | 3-Year Discount |
|---|---|---|
| VMs | ~30–40% | ~55–65% |
| SQL Database | ~30% | ~55% |
| Cosmos DB (RUs) | ~20% | ~40% |
| App Service (Isolated) | ~35% | ~55% |
Reservations apply to a specific VM size and region. They can be scoped to a subscription, resource group, or shared across subscriptions.
Savings Plans
Section titled “Savings Plans”More flexible than reservations — commit to a dollar amount per hour across any VM size/region:
Savings Plan: $10/hour compute commitment (3-year) ├── Covers any VM size in any region ├── Covers App Service Premium └── Covers Azure Functions Premium Discount: ~50–65% (varies by resource)Reservations vs Savings Plans
Section titled “Reservations vs Savings Plans”| Reservations | Savings Plans | |
|---|---|---|
| Scope | Specific size + region | Any size, any region |
| Flexibility | Low (exchange/refund available) | High (automatic) |
| Discount | Slightly higher | Slightly lower |
| Best for | Stable, predictable workloads | Variable or multi-region workloads |
Spot VMs
Section titled “Spot VMs”Use Azure Spot VMs for fault-tolerant workloads at up to 90% discount:
# Create a Spot VMaz vm create \ --resource-group myapp-rg \ --name batch-worker \ --image Ubuntu2204 \ --size Standard_D4s_v5 \ --priority Spot \ --eviction-policy Deallocate \ --max-price 0.10Spot VMs can be evicted when Azure needs the capacity. Use them for batch processing, CI/CD, dev/test, and stateless workloads.
Common Cost Traps
Section titled “Common Cost Traps”| Trap | Prevention |
|---|---|
| Forgotten dev/test VMs | Auto-shutdown schedule, budget alerts, Environment tag |
| Oversized VMs | Start small, use Advisor right-sizing recommendations |
| Premium storage for dev | Use Standard SSD for non-production |
| Unattached disks | Periodic cleanup, Advisor alerts |
| Idle Application Gateways | ~$175/month even with no traffic — delete when not needed |
| Log Analytics over-ingestion | Set daily caps, archive old data, filter noisy logs |
| Public IPs | Static public IPs cost ~$3.65/month each — delete unused ones |
| ExpressRoute / VPN Gateways | Fixed monthly cost even when idle — right-size or remove |
Cost Optimization Strategies
Section titled “Cost Optimization Strategies”Quick Wins
Section titled “Quick Wins”- Auto-shutdown dev/test VMs at end of day.
- Delete unattached disks and unused public IPs.
- Move cold blobs to Cool or Archive tier.
- Right-size VMs based on Advisor recommendations.
- Use B-series VMs for bursty, low-utilization workloads.
Medium-Term
Section titled “Medium-Term”- Buy Reservations for stable production VMs and databases.
- Use Spot VMs for batch processing and CI/CD.
- Azure SQL Serverless for databases with intermittent usage (auto-pause).
- Cosmos DB autoscale instead of fixed throughput.
- Azure Functions Consumption plan for event-driven workloads.
Organizational
Section titled “Organizational”- Enforce tags via Azure Policy for cost attribution.
- Set budgets per resource group and subscription.
- Separate subscriptions for prod, dev, and sandbox.
- Monthly cost reviews — review Cost Analysis with team leads.
- Use management groups for consolidated billing visibility.
Multi-Subscription Cost Management
Section titled “Multi-Subscription Cost Management”For organizations with multiple subscriptions:
Management Group: Company ├── Production MG │ ├── Sub: prod-web (Budget: $10,000) │ └── Sub: prod-data (Budget: $8,000) ├── Development MG │ ├── Sub: dev (Budget: $2,000) │ └── Sub: sandbox (Budget: $500) └── Platform MG └── Sub: shared-services (Budget: $5,000)Cost Management supports viewing costs across all subscriptions under a management group — useful for finance and engineering leadership.
Key Takeaways
Section titled “Key Takeaways”- Cost Analysis is your main tool — filter by service, resource group, tag, and time range.
- Budgets with alert thresholds catch spending surprises before the bill arrives.
- Tags (enforced via policy) are the foundation of cost attribution — require Environment, Team, and CostCenter.
- Advisor automatically finds right-sizing opportunities, idle resources, and reservation candidates.
- Reservations save 30–65% for steady-state workloads; Savings Plans offer flexibility.
- Spot VMs offer up to 90% discount for fault-tolerant workloads.
- Common traps: forgotten dev VMs, oversized resources, unattached disks, premium storage in dev.