I run OpenClaw on an AWS EC2 instance. It’s a small t3.micro — nothing fancy — but cloud costs have a way of creeping up when you’re not watching.

AWS offers cost alerts. I set them up. They work fine — they fire any day you hit your threshold.

The problem: alerts don’t help you understand why you’re spending. They just tell you you’ve hit a limit. No breakdown by service. No trend analysis. No way to spot anomalies early.

I wanted something better: a weekly spending report that shows root causes and trends early enough to act.

What I Wanted

  • Weekly summary — last 7 days, month-to-date, projected monthly total
  • Service breakdown — which AWS services are actually costing money?
  • Trend detection — is spending increasing, stable, or decreasing vs. last week?
  • Delivered automatically — no logging into AWS Console to check

The goal: catch anomalies early. If OpenClaw suddenly starts burning through bandwidth or disk I/O, I want to know this week, not when the monthly bill arrives.

Building the Solution with OpenClaw

I explained the problem to OpenClaw. It researched the AWS Cost Explorer API and helped me build the solution.

My requirements:

  • Weekly reports every Wednesday morning
  • Show last 7 days, month-to-date, projected monthly
  • Break down by service (EC2, VPC, data transfer, etc.)
  • Deliver to Telegram

OpenClaw’s solution:

  • Use the AWS CLI tool (aws ce get-cost-and-usage)
  • One call for daily breakdown (last 7 days)
  • Another call for month-to-date, grouped by service
  • Calculate projected monthly cost by extrapolating from days elapsed
  • Format as a readable Telegram message
  • Schedule via cron job (Wednesday 09:00 London time)

The entire implementation took one conversation. OpenClaw wrote the cron job payload, tested the AWS CLI commands, and set up the automation.

AWS Permissions: Granting Cost Explorer Access

For the AWS CLI to access billing data, you need to grant specific IAM permissions.

Step 1: Enable Cost Explorer

In the AWS Console:

  • Go to Billing and Cost Management
  • Navigate to Cost Explorer
  • Click Enable Cost Explorer (one-time activation)

This can take up to 24 hours to start showing data.

Step 2: Create an IAM Policy

Create a policy with these permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ce:GetCostAndUsage",
        "ce:GetCostForecast",
        "ce:GetDimensionValues"
      ],
      "Resource": "*"
    }
  ]
}

Step 3: Attach to Your IAM User or Role

If you’re running the AWS CLI with an IAM user, attach the policy to that user.

If you’re using an EC2 instance role (recommended), attach the policy to the instance role.

Step 4: Verify Access

Test from your server:

aws ce get-cost-and-usage \
  --time-period Start=$(date -d '7 days ago' '+%Y-%m-%d'),End=$(date '+%Y-%m-%d') \
  --granularity DAILY \
  --metrics BlendedCost

If you see JSON output with cost data, you’re set.

What the Report Shows

Every Wednesday, I get a message in my Telegram “System & Admin” topic:

AWS Spending Report

Last 7 days: $0.86
Month-to-date (Feb 1–14): $1.90
Projected monthly: $3.80

Top services:
- VPC (data transfer): $1.52 (80%)
- Tax: $0.32 (17%)
- Cost Explorer: $0.06 (3%)
- EC2 Other: <$0.01

Trend: stable vs last week

The breakdown is the key insight. In my case:

  • VPC (data transfer) — the vast majority of AWS costs (80%)
  • Tax — UK VAT on AWS services (17%)
  • Cost Explorer — the API calls for this very report (3%)
  • EC2/EBS — surprisingly minimal (the instance and storage are in AWS Free Tier)

Understanding the Cost Drivers

My actual AWS infrastructure spend is around $3.80/month. Surprisingly low.

Here’s why:

1. EC2 instance (Free Tier)
A t3.micro in eu-west-2 (London) running 24/7. Currently covered by AWS Free Tier (750 hours/month for 12 months). After Free Tier expires, this will be ~$6–8/month.

2. EBS Storage (Free Tier)
8GB root volume + 150GB gp3 data volume. The 150GB costs ~$12/month normally, but is currently covered by Free Tier (30GB free). Post-Free Tier, expect ~$12–15/month for disk.

3. VPC (data transfer) ($1.52/month)
The only significant cost right now. This is internet data transfer OUT:

  • LLM API traffic (Claude, GPT, Gemini responses)
  • Daily news digest (RSS fetching)
  • Email checks (Gmail API)
  • Web searches (Brave Search API)
  • Cron job outputs to Telegram

Data transfer in to AWS is free. Data transfer out costs $0.09/GB (first 10TB). At $1.52/month, I’m transferring about 17GB/month outbound.

4. Cost Explorer ($0.06/month)
The irony: monitoring costs money. Each API call to Cost Explorer costs $0.01. Running weekly reports = ~6 calls/month.

Post-Free-Tier projection: Once Free Tier expires (12 months from account creation), expect AWS costs to rise to ~$20–25/month (EC2 + EBS + data transfer).

Total cost of ownership: AWS infrastructure ($4/month now, $20–25/month later) + LLM API costs (Anthropic/OpenAI/Google, billed separately, ~$30–40/month depending on usage).

In perspective: Even at full price (~$55–65/month total), that’s what I pay for a personal assistant that never sleeps, monitors my email 24/7, runs my daily and weekly planning rituals, curates news from a dozen sources, tracks my health metrics, backs up my files, and answers questions instantly at any hour.

Less than the cost of two business lunches. For something that multiplies my productivity every single day.

The Disk Space Crisis (and the 150GB Solution)

Early on, my root volume kept filling up. The culprit: OpenClaw updates.

When you run npm install or update OpenClaw dependencies, npm downloads hundreds of packages. Each update cycle consumed 500MB–1GB. I was running updates multiple times while debugging disk space issues, which ironically made the problem worse.

At one point, the root volume hit 95% full. The system started failing in weird ways:

  • Log rotation stopped working
  • Temporary files couldn’t be created
  • Package updates failed mid-install

The breaking point: I tried to update OpenClaw to fix an issue, but the update itself failed because there wasn’t enough disk space. Classic catch-22.

The solution: OpenClaw helped me add a 150GB EBS volume mounted at /mnt/data and migrate npm/OpenClaw there.

Steps:

  1. Created a 150GB gp3 volume in AWS Console
  2. Attached it to the instance (/dev/xvde)
  3. Formatted and mounted at /mnt/data
  4. Moved npm global packages to /mnt/data/npm-global
  5. Updated npm config to use the new location
  6. Symlinked OpenClaw installation to /mnt/data

Current disk usage:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       6.8G  4.7G  2.1G  70% /
/dev/xvde1      147G  3.2G  136G   3% /mnt/data

The root volume is no longer under pressure. OpenClaw updates now happen on the data volume, where there’s plenty of room.

Cost impact: the 150GB gp3 volume will cost ~$12/month once Free Tier expires. Currently covered by AWS Free Tier (30GB free for 12 months). Worth it for peace of mind.

Why OpenClaw Updates Were Expensive

This was a surprise learning: OpenClaw updates consumed significant disk space and compute resources.

Every OpenClaw update:

  1. Downloads the updated package and all dependencies from the internet → data transfer IN (free on AWS)
  2. Unpacks and processes the update → CPU/compute time (costs money on EC2)
  3. Writes everything to disk → fills storage rapidly
  4. If you’re low on disk, the install fails mid-process, you debug, and you retry → wasted compute cycles

The real culprit: The OpenClaw update itself (the package and its dependency tree) was large. When disk space was constrained, updates would fail partway through, leaving the system in a broken state. I’d retry, which would:

  • Use more compute time (EC2 charges by the hour)
  • Download files again (free bandwidth, but wasted compute)
  • Attempt to write to a nearly-full disk (fail again)

When I was troubleshooting the disk space issue, I ran update cycles 5–6 times in a few days. Each retry burned compute time and made the disk situation worse.

Important clarification: AWS inbound data transfer is free. The cost wasn’t bandwidth—it was the compute time to process failed updates and the disk space exhaustion that triggered the retry loop.

Once the 150GB volume was in place, updates completed successfully on the first try. No more retry loops. No more wasted compute.

How Much Should You Spend?

For my use case (24/7 OpenClaw instance, moderate LLM usage, daily automation), AWS infrastructure costs are $3.80/month (currently on Free Tier).

Post-Free-Tier, expect:

  • ~$6–8 for the t3.micro instance (24/7)
  • ~$12–15 for disk storage (150GB gp3 + root volume)
  • ~$2–4 for data transfer (LLM APIs, RSS, email)
  • Total: ~$20–25/month

If your AWS bill is significantly higher, investigate:

  • Are you running a larger instance than needed?
  • Is your data transfer unusually high? (Check CloudWatch metrics)
  • Are you storing unnecessary snapshots or old AMIs?
  • Are you using expensive services inadvertently? (RDS, Lambda cold starts, NAT gateways)

The weekly report makes these questions easy to answer.

Important: This is just the AWS infrastructure cost. LLM API costs (Anthropic Claude, OpenAI GPT, Google Gemini) are billed separately and can range from $30–100+/month depending on usage.

Results

Before: Monthly AWS alerts that fired when I hit thresholds. No breakdown. No trend analysis. Vague anxiety about cloud costs.

After: Weekly visibility into spending trends. Clear breakdown by service. Early warnings if something’s off. Confidence that I’m spending appropriately.

Surprises from the data:

  • AWS infrastructure is cheaper than expected (~$4/month on Free Tier, ~$20–25/month post-Free Tier)
  • VPC data transfer dominates costs (80% of current AWS spend)
  • EC2 and EBS are mostly covered by Free Tier for now
  • The real cost is LLM API usage (billed separately), not AWS infrastructure

The disk space crisis taught me an important lesson: infrastructure problems compound. Disk space → failed updates → retry loops → wasted bandwidth → higher costs. Fixing the root cause (150GB volume) eliminated the cascading effects.

And the weekly report? It takes zero effort now that it’s automated. Every Wednesday morning, I know exactly where I stand.

Sometimes the best cost control is just knowing what you’re spending.