How to Reduce Monthly Cloud Costs with an AI Agent: AWS, Azure, and Google Cloud Cleanup Guide

← Back to Blog

OpenClaw Setup

How to Reduce Monthly Cloud Costs with an AI Agent: AWS, Azure, and Google Cloud Cleanup Guide

Cloud bills grow silently. A VM spun up for a two-week pilot keeps running six months later. Snapshots and disk images pile up after every resize. Test environments stay online nights and weekends because nobody wants to be the person who deleted production. Spread that across AWS, Azure, Google Cloud, and a fourth provider someone signed up for on a credit card, and the line item you meant to cancel becomes four figures a year.

This guide shows how to reduce monthly cloud costs with an AI agent using a supervised workflow: read-only audit first, human-approved cleanup second, monthly watch third. It focuses on infrastructure spend (compute, storage, networking), not LLM token costs. For agent token visibility, see our OpenClaw cost dashboard guide. For cheaper models inside OpenClaw, see cheaper model routing for OpenClaw.

Quick answer: supervised cloud waste audit in five steps
  1. Connect read-only credentials for each cloud (Viewer / ReadOnly roles only).
  2. Inventory waste via CLI and console checks (idle VMs, orphaned disks, unused IPs).
  3. Produce a prioritized report with resource IDs and estimated monthly savings.
  4. Human review each line item; approve deletes and resizes explicitly.
  5. Execute approved cleanup and schedule a monthly re-audit (cron or calendar).

What a Real Multi-Cloud Audit Found

I ran an AI-assisted pass across three environments I actually use: Azure for a staging app, AWS for object storage and a legacy API, IBM Cloud for an old integration sandbox. The agent did not delete anything. It logged in with read-only credentials, ran inventory commands, and returned a spreadsheet-style summary. Illustrative findings from that pass:

Finding Provider Est. monthly waste Recommended action
D2s_v3 VM at 2% CPU for 21 days Azure $186 Stop or resize to B-series
Four unused AMIs + 12 orphaned EBS snapshots AWS $94 Snapshot golden image once; delete duplicates
Dev VPC with two instances and a public IP, no traffic IBM Cloud $142 Schedule nightly shutdown; release IP
Total (illustrative) $422 Approved in one review session

Numbers are rounded from a single audit and will differ in your accounts. The point is not the exact dollar amount: it is that waste hides in plain sight until something inventories across providers and ranks items by savings and risk.

Why Companies Miss Cloud Waste

Four structural reasons repeat across startups and mid-market teams:

  • Nobody owns the bill. Engineering provisions resources. Finance pays the invoice. Neither side has a recurring ritual to connect utilization charts to delete-or-resize decisions.
  • Engineers avoid deleting things. A stopped VM is safer than a missing VM when you are on call. Orphaned disks feel harmless at $8 a month until you have forty of them.
  • Dashboards show data, not a cleanup plan. Cost Explorer, Azure Cost Management, and GCP Billing show what you spent. They do not hand you a prioritized list with resource IDs and risk tiers.
  • Small teams lack FinOps headcount. FinOps practices exist precisely because cloud economics need ongoing ownership. Without a dedicated role, audits happen once after a budget shock, then never again.

Multi-cloud makes it worse. Idle resource semantics differ per provider: an AWS "stopped" instance may still bill for attached EBS; Azure deallocates differently than GCP stop behavior; IBM Cloud VPC pricing has its own footguns. A single-console FinOps tool helps, but many teams still need a workflow that runs where their credentials already live.

The Monthly Cloud Waste Checklist

Run this checklist every month before anyone deletes a resource. The table maps symptoms to detection methods and risk tiers (Low = snapshot then delete; Medium = verify owners; High = change window required).

Symptom How to detect Typical savings Risk tier
Idle VMs CPU/network near zero for 14+ days $50-500/mo each Medium
Oversized servers Rightsizing report or sustained low CPU $20-300/mo Low
Unattached disks Volume list with no instance attachment $10-200/mo Low
Old snapshots / images AMIs/snapshots not referenced by active templates $5-150/mo Low
Unused public IPs Elastic/static IPs with no association $3-15/mo each Low
Idle databases Zero connections; dev instances running 24/7 $30-400/mo High
Orphaned load balancers Zero healthy targets; no request traffic $15-50/mo Medium
Storage without lifecycle rules Bucket growth with no IA/archive transition $10-500/mo Low
Forgotten dev/test environments Tags or names like dev, staging, sandbox $100-1,000/mo Medium
Missing cost allocation tags Untagged rows in cost reports Visibility (not direct savings) Low

Read-only CLI starting points

Agents and engineers should begin with describe/list commands, not delete APIs. Examples:

# AWS
aws ec2 describe-instances --query 'Reservations[].Instances[].[InstanceId,State.Name,InstanceType]'
aws ec2 describe-volumes --filters Name=status,Values=available

# Azure
az vm list --show-details --query "[].{name:name, powerState:powerState, size:hardwareProfile.vmSize}"
az disk list --query "[?diskState=='Unattached'].{name:name, sizeGb:diskSizeGb}"

# Google Cloud
gcloud compute instances list --format="table(name,zone,machineType,status)"
gcloud compute disks list --filter="users:*" --format="table(name,sizeGb,zone)"

Official provider guidance on rightsizing and waste reduction: AWS Cost Optimization pillar.

Download the Cloud Waste Audit Checklist

CSV with all ten waste categories, CLI hints, risk tiers, and notes. Use it during your first read-only pass.

We email the download link immediately. No spam. Unsubscribe anytime.

Where AI Agents Help

An agent with cloud CLI access and clear guardrails compresses a multi-day manual review into a focused session:

  • Cross-provider inventory: one report across AWS, Azure, GCP, IBM Cloud, and more instead of three browser tabs and forgotten subscriptions.
  • Usage vs spend: normalize SKU names and flag oversized instances with evidence (metric snapshots, not guesses).
  • Plain-language summaries: finance and engineering leads get the same prioritized list with dollar estimates.
  • Approval-ready output: each row includes resource ID, region, owner tag (if any), and proposed action.
  • Supervised execution: after you approve, the agent runs delete/resize commands one class at a time while logging every action.

OpenClaw agents run in a Docker container on your infrastructure with your credentials, not as a third-party SaaS that stores cloud keys in a shared multi-tenant database. That matters when the audit touches production-adjacent accounts.

Your cloud details never reach the model in raw form. A waste audit feeds the LLM exactly the data you least want to leak: account IDs, access-key IDs, resource ARNs, and internal IPs. With Zedly Shield — installed as part of every setup session — that data is tokenized before it leaves your machine and rehydrated locally when the response returns. The model flags [AWS_ACCOUNT_1]'s idle volumes without ever seeing your real account number, so a cost audit never becomes a topology leak.

Where Agents Should Not Be Trusted Blindly

Autonomous deletion is how audits become outages. Keep agents in read-only mode until a human signs off. Never delegate these without explicit approval gates and rollback notes:

  • Production deletion: any resource in a prod tag or prod-named resource group.
  • Databases: RDS, Cloud SQL, Azure SQL, including "idle" instances that back staging copies of prod.
  • IAM and security changes: roles, policies, security groups, firewall rules.
  • DNS and networking: load balancers, VPN gateways, peering links (traffic may still route through them).
  • Anything without rollback: if you cannot restore from snapshot or redeploy from IaC, do not auto-delete.

The governance pattern matches human approval for sensitive OpenClaw actions and the broader runtime hardening stack: block or queue destructive tool calls, log decisions, review evidence before execution. Because this is one of the rare workflows where the agent eventually deletes resources, pair it with an immutable audit log so you can prove exactly what was removed, when, and on whose approval.

Risk tier Example Agent policy
Green (Low) Unattached disk, unused Elastic IP Report automatically; delete only after explicit approve
Yellow (Medium) Stopped VM, orphaned load balancer Require owner confirmation or tag lookup
Red (High) Production database, IAM change Block agent execution; human-only change window

Recommended Workflow: Audit, Review, Execute, Watch

Phase 1: Read-only audit

Issue Viewer / ReadOnly credentials per account. During the setup session, the engineer configures the read-only cloud CLIs (aws, az, gcloud) inside your OpenClaw container and mounts those scoped credentials locally — nothing is copied to Zedly. The agent then runs inventory only and writes a waste report with estimated monthly savings. No write API calls.

Phase 2: Human review

Engineering and finance review the report in a spreadsheet or approval channel (email, Slack, Telegram). Each approved row gets a ticket ID or explicit "yes" so the audit trail is clear.

Phase 3: Approved cleanup

Execute one resource class at a time: unattached disks first, then snapshots, then stopped VMs. Snapshot before delete. Log every command and resource ID.

Phase 4: Monthly watch

Schedule a recurring read-only audit (OpenClaw cron or calendar). Compare spend month over month; alert when new dev environments appear untagged. For visibility into scheduled agent runs, see OpenClaw cron run history.

A Cloud Waste Audit workflow is coming soon to the OpenClaw use cases gallery — a Shield-protected, scheduled workflow that turns the monthly re-audit into one click instead of a manual pass. Today you can install OpenClaw through Zedly Setup and run the same supervised audit in your first setup session: start a free Solo trial, bring OpenClaw up in Docker with one command, and the setup agent configures read-only cloud access and walks your team through audit and approved cleanup.

Run a Supervised Cloud Waste Audit

Zedly Setup for OpenClaw is live today: install OpenClaw in Docker on your Mac, Windows, or VPS with one command, then use a setup session to run a supervised AI cloud waste audit across AWS, Azure, Google Cloud, IBM Cloud, and more. Read-only first, human-approved cleanup, monthly re-check — with Shield keeping your account details out of the model. The illustrative audit above surfaced $422/month in waste; Solo is $19/month, so the first cleanup pass typically pays for the plan many times over.

  • 14-day free trial, no credit card: install, run the read-only audit, and see your savings before you pay
  • One-command Docker install: runs on your hardware — cloud keys never touch a Zedly server
  • Full session log: every command logged and exportable for your audit trail
Start Free Trial — No Credit Card See Plans & Pricing

Frequently Asked Questions

How much cloud waste is normal?

Industry surveys and FinOps practice often cite 20% to 35% of cloud spend as avoidable waste: idle compute, oversized instances, orphaned storage, and forgotten environments. The exact number depends on team size, tagging discipline, and how long resources have been running without review. A monthly read-only audit usually surfaces quick wins in the first pass.

Can an AI agent safely delete cloud resources?

Not without supervision. Agents are strong at inventory, cross-cloud comparison, and drafting cleanup lists with resource IDs. Deletion should run only after human review, scoped credentials, and a rollback plan. Start with read-only IAM roles, approve one resource class at a time, and never let an agent modify production databases or IAM policies without explicit sign-off.

What IAM permissions does a read-only cloud audit need?

On AWS, attach AWS managed ReadOnlyAccess or a tighter custom policy for EC2, EBS, RDS, S3, and Cost Explorer. On Azure, use Reader at subscription scope plus Cost Management Reader. On Google Cloud, use roles/viewer plus billing viewer for spend data. Avoid write, delete, or iam:* permissions during the audit phase.

AWS vs Azure vs GCP: which cloud has the most idle waste?

Waste patterns differ more by team habits than by provider. AWS accounts often accumulate unattached EBS volumes and old AMIs. Azure subscriptions collect stopped-but-allocated VMs and orphaned managed disks. GCP projects frequently leave preemptible or dev instances running 24/7. Multi-cloud teams compound the problem because no single console shows everything.

How often should you run a cloud waste audit?

Monthly is the practical minimum for teams without a dedicated FinOps function. Run a full read-only inventory at month start, review findings with engineering and finance, execute approved cleanup in a change window, then schedule a lighter re-check mid-month for new dev environments. Agents on a cron schedule make the monthly pass repeatable without manual console hopping.