DEV Community

Cover image for CloudClaw — Control AWS EC2 from WhatsApp Using a Custom OpenClaw Skill
Parul Malhotra
Parul Malhotra

Posted on

CloudClaw — Control AWS EC2 from WhatsApp Using a Custom OpenClaw Skill

OpenClaw Challenge Submission 🦞

This is a submission for the OpenClaw Challenge.

What I Built

CloudClaw — a natural language cloud manager that lets me control my AWS EC2 virtual machine directly from WhatsApp.

No more opening the AWS console at 2am to restart a crashed server. I just type:

"stop vm"
"check cpu on web server"
"list all my instances"

...and OpenClaw handles the rest — querying real cloud APIs and replying right back in my WhatsApp chat.

The flow:

WhatsApp message
    → OpenClaw gateway (macOS, via Linked Devices protocol)
    → cloud-manager AgentSkill
    → aws_manager.py (boto3)
    → AWS EC2 + CloudWatch
    → Reply back to WhatsApp ✅
    → Live Dashboard (localhost:8080) auto-updates every 10s
Enter fullscreen mode Exit fullscreen mode
What I type What happens
start vm / launch my server Starts EC2 instance, polls until Running, returns IP
stop vm / shut down server Gracefully stops instance, confirms when Stopped
restart vm / reboot server Reboots instance, gives ETA
list vms / show all servers All EC2 instances with status, type, IP
check cpu CPU % over 5m / 1h / 24h from CloudWatch
check memory RAM usage via CloudWatch Agent
status AWS cloud health report

OpenClaw's LLM understands intent, not just exact commands — so "boot up my prod box" and "launch web-server" both work.

How I Used OpenClaw

OpenClaw is the entire backbone of CloudClaw. Here's exactly how it powers the project:

1. Custom AgentSkill — cloud-manager/SKILL.md

OpenClaw's Skills system lets you write a SKILL.md file that describes to the agent what your tool does, when to use it, and how to call it. This is the brain of CloudClaw.

The skill tells OpenClaw:

  • Which messages should trigger cloud operations (using natural language trigger rules)
  • Whether to route to AWS, GCP, or both
  • How to call my Python scripts via the built-in exec tool
  • How to format WhatsApp-friendly replies
---
name: cloud-manager
description: >
  Manages AWS EC2 instances and GCP Compute Engine instances via natural language.
user-invocable: true
triggers:
  - start vm
  - stop vm
  - restart vm
  - list vms
  - check cpu
  - check memory
  - cloud status
metadata:
  openclaw:
    requires:
      bins: ["python3"]
---
Enter fullscreen mode Exit fullscreen mode

The rest of the SKILL.md contains NLP routing rules and response formatting instructions in plain Markdown — OpenClaw reads this and knows exactly what to do.

2. Python Script — boto3

OpenClaw's exec tool lets skills run shell commands and Python scripts. I wrote:

aws_manager.py — uses boto3 to:

  • ec2.start_instances() / ec2.stop_instances() / ec2.reboot_instances()
  • ec2.describe_instances() for listing
  • cloudwatch.get_metric_statistics() for CPU and memory metrics
  • Polling loops that wait for state changes and return the final result

The script returns clean, emoji-formatted output designed to look great in a WhatsApp message. No AWS CLI required — boto3 reads credentials directly from ~/.aws/credentials.

gcp_manager.py is also included in the repo for GCP Compute Engine support — same pattern, using google-cloud-compute SDK.

3. WhatsApp Channel — Zero Configuration

OpenClaw natively supports WhatsApp via the Linked Devices protocol (same as WhatsApp Web). No Meta developer account, no webhooks, no ngrok needed:

openclaw channels add
# → Select "WhatsApp (QR link)"
# → Scan QR in WhatsApp → Settings → Linked Devices
Enter fullscreen mode Exit fullscreen mode

Once linked, every WhatsApp message I send hits the OpenClaw gateway, gets analyzed by the LLM, and if it matches a cloud intent — the cloud-manager skill fires.

4. Persistent Memory & Context

One underrated OpenClaw feature I leveraged: persistent memory. After I told OpenClaw which instance is my "default web server", it remembered it. Now I can just say "restart it" and OpenClaw knows exactly what I mean — context stored in its local workspace as Markdown files.

Demo

Here's what a real conversation looks like:

Listing instances:

Me: list vms

CloudClaw: ☁️ AWS EC2 Instances (us-east-1):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔴 aws-web-vm
   ID: i-01043f009316db5e7 | Type: t3.micro
   Zone: us-east-1c | IP: —
   State: STOPPED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total: 1 | 🟢 Running: 0 | 🔴 Stopped: 1
Enter fullscreen mode Exit fullscreen mode

Starting the instance:

Me: start vm

CloudClaw: 🚀 Starting aws-web-vm (i-01043f009316db5e7)...
   Polling for state change...
✅ aws-web-vm is now RUNNING!
   Public IP: 54.x.x.x
   Zone: us-east-1c
   Started in: 28s
Enter fullscreen mode Exit fullscreen mode

CPU check:

Me: check cpu

CloudClaw: 📊 CPU Metrics — aws-web-vm
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Last 5 min:   4.2%  [░░░░░░░░░░░░░░░░░░░░] ✅
Last 1 hour:  3.8%  [░░░░░░░░░░░░░░░░░░░░] ✅
Peak (24h):   12.1% at 09:15 UTC
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Instance state: 🟢 RUNNING
Enter fullscreen mode Exit fullscreen mode

Live Dashboard: Run python3 dashboard/server.py and open http://localhost:8080 — the dashboard polls real AWS status every 10 seconds and updates automatically when you start/stop the VM from WhatsApp.

🎬 Demo Video: Watch on YouTube

🔗 GitHub: github.com/parulmalhotraiitk/clawcloud

What I Learned

1. OpenClaw Skills are insanely powerful for this use case

I expected to write a lot of glue code. Instead, SKILL.md did most of the heavy lifting. The LLM's natural language understanding is baked in — I didn't need to write any intent parsing code at all. I just described in plain English what "start vm" means and OpenClaw figured out the rest.

2. The exec tool is the secret weapon

Being able to run any Python script from inside a skill means OpenClaw can do anything your machine can do. For cloud management, this is perfect — boto3 and the GCP SDK handle authentication, retries, pagination, and rate limiting. I just had to wire them up.

3. WhatsApp as a cloud control interface is genuinely useful

I've been using this for a week and I've already used it from my phone while away from my desk multiple times. The constraint of WhatsApp (no rich UI, just text) actually forces you to write clear, concise responses — which turns out to be exactly what you want for infrastructure operations.

4. "Local-first" is the right architecture for infra control

Your AWS credentials and GCP keys never leave your machine. OpenClaw runs the Python scripts locally, the cloud APIs respond to your machine directly. There's no middleware, no SaaS layer, no data going through a third party. For infrastructure management, this matters a lot.

5. The pairing security model is smart

OpenClaw's dmPolicy="pairing" means random people can't message your bot and start stopping your VMs. Before anyone can interact with the agent, they need to enter a pairing code. Simple and effective.

ClawCon Michigan

I didn't attend ClawCon Michigan, but I've been following along online — the community builds shared from the event are genuinely inspiring and pushed me to take this project further.


Thanks for an amazing challenge! OpenClaw is the first tool in years that's made me feel like I'm living in the future. 🦞

Top comments (0)