Skip to content

About

OpenClaw AWS infrastructure

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

47 Commits

Folders and files

Repository files navigation

openclaw-aws

AWS infrastructure for an always-on OpenClaw autonomous AI agent — EC2 + Slack + Anthropic API + OpenRouter, ~$14/month.

What this is

A single EC2 t4g.small instance (Ubuntu 24.04 arm64, 2GB RAM) running the OpenClaw gateway as a systemd service. Reachable via Slack DM (Socket Mode — no inbound ports). Access via AWS SSM Session Manager (no SSH, no open port 22). AWS credentials via EC2 instance role — no access keys on disk.

Quickstart

# 1. Check for existing deployments first
cd infra && terraform state list 2>/dev/null

# 2. Copy and fill in repo URLs / region; store secrets in SSM (see docs/setup.md step 3b)
cp infra/terraform.tfvars.example infra/terraform.tfvars

# 3. Deploy
terraform init && terraform apply

# 4. Add GitHub deploy key, approve Slack pairing (see docs/setup.md)

# 5. Run smoke tests
cd .. && uv run pytest tests/smoke/ -v

Docs

Peer agent

This instance runs alongside hermes-aws — a companion agent on a separate EC2 instance. The two watch each other for failures using AWS SSM: OpenClaw polls Hermes hourly and DMs the owner if Hermes goes dark. See docs/peer-monitoring.md for how to set this up between any two agent instances.

Cost

Component Cost
EC2 t4g.small (2GB RAM, arm64) ~$13/month
EBS gp3 16GB root ~$1.28/month
DLM daily AMI snapshots (7-day retain) ~$0.40/month
Anthropic API (haiku/sonnet/opus — same price as OpenRouter) ~$0–2/month
OpenRouter (codex, gemini, flash fallbacks) ~$0/month
Total ~$14/month

1-year reserved t4g.small: ~$8.50/month → ~$9.50/month total — comparable to the previous Lightsail setup ($7/month instance, but with 2× RAM and proper IAM instance role).

Inspiration

Originally based on Running OpenClaw on AWS Lightsail by awsfundamentals.com. This repo migrated to EC2 for the IAM instance role, more RAM, and ARM64 pricing — the original Lightsail approach is preserved in docs/archive/lightsail-setup-plan.md.

About

OpenClaw AWS infrastructure

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages