0Pricing
Cloud & IT Cert Prep · Lesson

Identifying and Eliminating Waste

Use Azure Cost Management + Advisor recommendations to find idle VMs, unattached disks, over-provisioned services, and zombie resources, then decommission them.

Identifying and Eliminating Waste 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.

Cloud Waste: The Hidden Cost Driver

Studies consistently show that organisations waste 25–35% of their cloud spend on resources that are idle, over-provisioned, or forgotten. In Azure, common waste sources include VMs running around the clock with near-zero CPU usage, unattached managed disks left over after VM deletion, orphaned public IP addresses, and unused App Service plans. Identifying and eliminating this waste is the first and highest-ROI step in any FinOps practice.

Azure Advisor Cost Recommendations

Azure Advisor continuously analyses your resource utilisation and generates Cost recommendations automatically. Common recommendations include: right-size or shut down under-utilised VMs (below 5% CPU or 2% memory utilisation for 7 days), purchase Reserved Instances for consistently running VMs, delete unattached public IP addresses, and remove idle Application Gateway instances. Each recommendation shows the estimated monthly savings so you can prioritise by impact.

# List Advisor cost recommendations via CLI
az advisor recommendation list \
  --category Cost \
  --query '[].{Resource:resourceName, Impact:impact, Savings:extendedProperties.annualSavingsAmount}' \
  --output table

Finding Idle and Under-Utilised VMs

Azure Monitor collects CPU percentage and network in/out metrics for every VM. A VM consistently below 5% CPU is a strong candidate for right-sizing or shutdown. Use the Virtual Machine Insights feature in Azure Monitor to see a fleet-wide view of CPU and memory utilisation over 24 hours, 7 days, or 30 days. The Advisor recommendation for under-utilised VMs links directly to the performance charts so you can confirm the pattern before acting.

# Query average CPU for a VM over the last 7 days
az monitor metrics list \
  --resource /subscriptions/<sub>/resourceGroups/myRG/providers/Microsoft.Compute/virtualMachines/myVM \
  --metric 'Percentage CPU' \
  --interval PT1H \
  --start-time 2024-06-01T00:00:00Z \
  --end-time 2024-06-08T00:00:00Z \
  --aggregation Average

Unattached Disks and Snapshots

When a VM is deleted without choosing to delete its disks, the managed disks remain and keep accruing charges. In the Azure portal, filter Disks by Disk state: Unattached to find these orphaned disks. Similarly, old snapshots taken for backup or migration purposes are often forgotten. Snapshot storage is cheaper than managed disk storage, but a year of forgotten snapshots across a large subscription can add up to thousands of dollars annually.

# Find all unattached managed disks in a subscription
az disk list \
  --query '[?diskState == `Unattached`].{Name:name, RG:resourceGroup, SizeGB:diskSizeGb}' \
  --output table

Orphaned Public IP Addresses and NICs

Public IP addresses in Azure are billed even when not associated with a running resource. When VMs or load balancers are deleted, their public IPs and network interfaces may remain. Filter Public IP Addresses by Associated to: None in the portal and delete those you no longer need. Similarly, orphaned network interfaces that are not attached to any VM or service can be safely removed. These are small individual charges but add up across hundreds of resources.

# Find unassociated public IP addresses
az network public-ip list \
  --query '[?ipConfiguration == null].{Name:name, RG:resourceGroup, SKU:sku.name}' \
  --output table

Zombie Resources: Staging and Dev Environments

Zombie resources are long-lived staging, testing, or proof-of-concept environments that were provisioned and then forgotten. Unlike idle production VMs, these may have moderate utilisation during business hours but serve no active project. Implement a resource tagging policy that requires Environment and Project tags on every resource, then schedule automated alerts for resources where Environment=Dev or Environment=Test that are more than 90 days old.

# Find resources tagged as Dev that are over 90 days old (approximate via createdTime)
az resource list \
  --tag Environment=Dev \
  --query '[].{Name:name, Type:type, RG:resourceGroup}' \
  --output table

Auto-Shutdown for Dev and Test VMs

Azure VMs support an Auto-Shutdown feature that automatically stops a VM at a configured time each day. Enable this on all dev and test VMs to ensure they do not run overnight or on weekends. For example, a dev VM running 24/7 costs the same as 24 hours, but one configured to auto-shutdown at 6 PM and auto-start at 8 AM on weekdays only uses 50 hours per week instead of 168 — saving approximately 70% on compute cost.

# Enable auto-shutdown at 18:00 UTC on a dev VM
az vm auto-shutdown \
  --resource-group myRG \
  --name myDevVM \
  --time 1800 \
  --email admin@contoso.com

Azure Cost Management: Anomaly Detection

Azure Cost Management includes an Anomaly Detection feature that uses machine learning to identify unexpected spikes in spending. When a subscription or resource group's cost deviates significantly from predicted patterns — for example, someone accidentally deploys a GPU VM or forgets to delete an ExpressRoute gateway — Cost Management sends an anomaly alert via email. Setting up anomaly alerts is a quick win that catches runaway costs before they appear on the monthly bill.

# Create a cost anomaly alert
az costmanagement alert create \
  --name 'AnomalyAlert' \
  --scope '/subscriptions/<subscriptionId>' \
  --type 'Anomaly' \
  --contact-emails 'finance@contoso.com'

Rightsizing Storage and Database Tiers

Not all waste is compute-related. Azure SQL Databases provisioned on the Business Critical tier but running simple read-heavy queries may perform identically on the General Purpose tier at half the cost. Blob Storage data that is rarely accessed should be moved from the Hot tier to the Cool or Archive tier using lifecycle management policies. Azure Advisor surfaces database and storage rightsizing recommendations alongside compute ones.

# Create a Blob lifecycle policy to move data to Cool tier after 30 days
az storage account management-policy create \
  --account-name mystorageacct \
  --resource-group myRG \
  --policy @- << 'POLICY'
{
  'rules': [{
    'name': 'MoveOldDataToCool',
    'type': 'Lifecycle',
    'definition': {
      'actions': { 'baseBlob': { 'tierToCool': { 'daysAfterModificationGreaterThan': 30 } } },
      'filters': { 'blobTypes': ['blockBlob'] }
    }
  }]
}
POLICY

Building a Waste Elimination Backlog

Treat cost optimisation as an ongoing engineering practice, not a one-time event. Create a FinOps backlog in Azure DevOps or Jira with items generated weekly from Advisor recommendations and cost anomaly alerts. Assign each waste item to the owning team and set a target resolution date. Track savings realised vs. savings identified to measure FinOps maturity. Schedule a monthly cost review with engineering leads and finance to keep waste elimination top of mind across the organisation.

Governance to Prevent Future Waste

Prevention is more cost-effective than remediation. Use Azure Policy to deny the creation of expensive VM SKUs (like GPU or M-series) without approval, require Environment and ExpiryDate tags on all resources, and automatically enable auto-shutdown on newly created VMs in dev subscriptions. Combine policies with budget alerts set at 80% and 100% of the monthly allocation so teams are notified before overspending occurs.

Quick Check

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

Lesson Recap

In this lesson you learned: Azure Advisor surfaces actionable cost recommendations for idle VMs, unattached disks, and over-provisioned services, auto-shutdown for dev VMs can cut compute spend by 70%, and governance policies with tagging prevent future waste from accumulating. Next up we look at right-sizing techniques and autoscaling strategies.

Frequently asked questions

Is the “Identifying and Eliminating Waste” lesson free?

Yes — the full text of “Identifying and Eliminating Waste” 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 “Identifying and Eliminating Waste”?

Use Azure Cost Management + Advisor recommendations to find idle VMs, unattached disks, over-provisioned services, and zombie resources, then decommission them. 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 “Identifying and Eliminating Waste” 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. Identifying and Eliminating Waste
  2. Right-Sizing and Autoscaling
  3. Azure Savings Plans and Reservations
  4. FinOps and Chargeback Models
← Back to Cloud & IT Cert Prep