{"id":49092511,"url":"https://github.com/tverney/openclaw-agentcore-personal","last_synced_at":"2026-04-20T19:10:10.452Z","repository":{"id":341504418,"uuid":"1166946542","full_name":"tverney/openclaw-agentcore-personal","owner":"tverney","description":"Deploy your own personal OpenClaw on AWS Bedrock AgentCore — serverless, ~$9/mo, one-click CloudFormation, Discord/WhatsApp/Telegram 🦞","archived":false,"fork":false,"pushed_at":"2026-04-04T21:16:11.000Z","size":16794,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T21:55:38.748Z","etag":null,"topics":["agentcore","ai-assistant","amazon-bedrock","aws","bedrock","bedrock-agentcore","clawdbot","cloudformation-template","discord-bot","eventbridge","eventbridge-scheduler","kiro","moltbot","openclaw","personal-assistant","serverless"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"aws-samples/sample-OpenClaw-on-AWS-with-Bedrock","license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tverney.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-25T19:30:43.000Z","updated_at":"2026-04-04T21:16:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tverney/openclaw-agentcore-personal","commit_stats":null,"previous_names":["tverney/openclaw-personal-agentcore","tverney/openclaw-discord-personal-agentcore","tverney/openclaw-agentcore-personal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tverney/openclaw-agentcore-personal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tverney%2Fopenclaw-agentcore-personal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tverney%2Fopenclaw-agentcore-personal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tverney%2Fopenclaw-agentcore-personal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tverney%2Fopenclaw-agentcore-personal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tverney","download_url":"https://codeload.github.com/tverney/openclaw-agentcore-personal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tverney%2Fopenclaw-agentcore-personal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32061396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentcore","ai-assistant","amazon-bedrock","aws","bedrock","bedrock-agentcore","clawdbot","cloudformation-template","discord-bot","eventbridge","eventbridge-scheduler","kiro","moltbot","openclaw","personal-assistant","serverless"],"created_at":"2026-04-20T19:10:09.636Z","updated_at":"2026-04-20T19:10:10.445Z","avatar_url":"https://github.com/tverney.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy Your Personal OpenClaw on AWS AgentCore — Serverless, \\~$9/month\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![AWS CloudFormation](https://img.shields.io/badge/AWS-CloudFormation-orange?logo=amazonaws)](openclaw-simplified.yaml)\n[![Python 3.10+](https://img.shields.io/badge/Python-3.10+-blue?logo=python)](https://python.org)\n[![Built with Kiro](https://img.shields.io/badge/Built%20with-Kiro-blueviolet)](https://kiro.dev)\n\n\u003e Cost-optimized [OpenClaw](https://github.com/aws-samples/sample-OpenClaw-on-AWS-with-Bedrock) deployment using AWS Bedrock AgentCore Runtime. Connect via Discord, WhatsApp, Telegram, or Slack. \\~$9-15/month infrastructure.\n\n[![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=openclaw-personal\u0026templateURL=https://raw.githubusercontent.com/tverney/openclaw-personal-agentcore/main/openclaw-simplified.yaml)\n\n## What Is This?\n\nA single-user, serverless deployment of OpenClaw on AWS. Instead of running an EC2 instance 24/7, the AI runs on-demand via AgentCore Runtime — the container freezes between invocations, so you only pay when you use it.\n\nAll messaging plugins (WhatsApp, Telegram, Discord, Slack) are pre-installed in OpenClaw. This template includes a Discord bot by default, but you can connect any platform directly through the OpenClaw Web UI.\n\n## Architecture\n\n```\nYou (Discord / WhatsApp / Telegram / Slack)\n  │\n  ▼\n┌──────────────────────────────────────────────────────────┐\n│  AWS Cloud                                               │\n│                                                          │\n│  EC2 t4g.nano ──invoke──▶  AgentCore Runtime             │\n│  (Discord bot)             (OpenClaw container)          │\n│                                │                         │\n│                            IAM Role                      │\n│                                │                         │\n│                            Bedrock                       │\n│                          (Haiku/Sonnet/Nova)             │\n│                                                          │\n│  ┌─────────┐  ┌──────────┐  ┌─────────┐  ┌───────────┐ │\n│  │ KMS     │  │ Secrets  │  │ S3      │  │EventBridge│ │\n│  │(encrypt)│  │ Manager  │  │(sessions│  │(cron jobs) │ │\n│  └─────────┘  └──────────┘  │ memory) │  └───────────┘ │\n│                              └─────────┘                 │\n│  CloudWatch ─── SNS ─── Budget Alerts                    │\n└──────────────────────────────────────────────────────────┘\n  │\n  ▼\nYou (receive response)\n```\n\n- **AgentCore Runtime**: Runs OpenClaw in a managed container that freezes when idle\n- **EC2 nano**: Lightweight Discord bot relay (\\~512MB RAM, only needed for Discord)\n- **Bedrock**: Model inference via IAM — no API keys to manage\n- **EventBridge → Lambda**: External cron scheduler (container freezes make in-container cron unreliable)\n\n## Cost Comparison\n\n| | Original EC2 Deployment | Lightsail Deployment | This AgentCore Deployment |\n|---|---|---|---|\n| Compute | EC2 running 24/7 (\\~$35/mo) | Lightsail 4GB plan ($24/mo) | Serverless, pay-per-use |\n| Complexity | Multi-tenant, VPC required | Pre-configured, simple | Single-user, minimal infra |\n| Scaling | Manual | Fixed instance | Auto-freezes when idle |\n| Typical cost | \\~$80/month | \\~$24/month* | \\~$9-15/month** |\n\n*\\*Lightsail cost excludes model tokens (Bedrock usage billed separately).*\n*\\*\\*\\~$4 EC2 nano (Discord bot) + \\~$3.60 public IPv4 + \\~$1 KMS + pennies for ECR/S3/Secrets Manager/CloudWatch. Model token costs are additional and vary by usage.*\n\n\u003e **Note**: If you use WhatsApp or Telegram (webhook-based) instead of Discord, you can eliminate the EC2 instance entirely — reducing infra to \\~$1-2/month.\n\n## Models\n\nSwitch models with one parameter in `.env` — no code changes:\n\n| Model | Input / Output per 1M tokens | Best for |\n|---|---|---|\n| Claude Haiku 4.5 (default) | $1.00 / $5.00 | Fast, efficient, great for daily tasks |\n| Claude Sonnet 4 | $3.00 / $15.00 | Complex reasoning, coding |\n| Nova Lite | $0.06 / $0.24 | Budget-friendly, simple tasks |\n| Nova Pro | $0.80 / $3.20 | Balanced performance, multimodal |\n| DeepSeek R1 | $0.55 / $2.19 | Open-source reasoning |\n\nUses cross-region inference profiles (`us.` prefix) — requests auto-route to optimal locations for higher throughput.\n\n## What Can OpenClaw Do?\n\nOnce connected, just message it:\n\n```\nYou: What's the weather in Austin?\nYou: Summarize this PDF [attach file]\nYou: Remind me every Sunday at 9am to check the weather forecast\nYou: Search the web for AWS Bedrock pricing\nYou: Add eggs and milk to my shopping list\nYou: What are my Google Calendar events today?\n```\n\nOpenClaw comes with 30+ bundled skills. This template adds custom skills for weather, notes/reminders, stock tracking, soccer scores, and more via the `community-skills.json` system.\n\n## Security\n\n| Layer | What it does |\n|---|---|\n| KMS (CMK) | Encrypts S3 data, Secrets Manager values, and SNS topics |\n| Secrets Manager | Stores all sensitive values (API keys, tokens) — no plaintext in CloudFormation |\n| IAM Roles | Least-privilege per component (AgentCore, Discord bot, Lambda, Scheduler) |\n| S3 Bucket Policy | Restricts session/memory access to the execution role only |\n| No public ports | Discord bot calls out only — nothing listens for inbound connections |\n| AgentCore isolation | Container runs in AWS-managed environment, not a raw EC2 |\n| Budget alerts | SNS notifications at 80% and 100% of configurable monthly limit |\n| CloudWatch | Monitoring and alarming on spend |\n\n## Prerequisites\n\n- AWS CLI configured with your account (`aws configure`)\n- Docker running locally (used to build the AgentCore container image)\n- Go 1.21+ (for cross-compiling the Alexa CLI and GOG CLI binaries)\n- [Bedrock model access](https://console.aws.amazon.com/bedrock/home#/modelaccess) enabled for your chosen model\n- A Discord bot token (optional — only if using the Discord integration)\n\n## Quick Start\n\n### 1. Configure\n\n```bash\ncp agent-container/.env.example agent-container/.env\n# Edit .env with your settings (model ID, Discord token, etc.)\n```\n\n### 2. Deploy\n\n```bash\nbash scripts/deploy.sh\n```\n\nThis single command handles everything: validates the template, builds the Docker image, pushes to ECR, deploys/updates the CloudFormation stack, and deploys the Discord bot.\n\n### 3. Chat\n\nIn Discord: `@YourBot hello!`\n\nOr open the OpenClaw Web UI via SSM port forwarding to connect WhatsApp, Telegram, or Slack.\n\n### 🎯 Deploy with Kiro AI\n\nPrefer a guided experience? [Kiro](https://kiro.dev) walks you through deployment conversationally — just open this repo as a workspace and say \"help me deploy my personal OpenClaw\".\n\n→ [Kiro Deployment Guide](QUICK_START_KIRO.md)\n\n## After Deployment\n\n```bash\n# Check stack status\naws cloudformation describe-stacks --stack-name openclaw-personal --region us-east-2\n\n# Test the runtime directly\naws bedrock-agentcore invoke-agent-runtime \\\n  --agent-runtime-arn \"YOUR_RUNTIME_ARN\" \\\n  --payload \"$(echo -n '{\"message\":\"hello\"}' | base64)\" \\\n  /tmp/output.json --region us-east-2\n\n# View Discord bot logs (via SSM)\naws ssm send-command --instance-ids YOUR_INSTANCE_ID \\\n  --document-name \"AWS-RunShellScript\" \\\n  --parameters 'commands=[\"journalctl -u discord-bot -n 30\"]' \\\n  --region us-east-2\n```\n\n## Project Structure\n\n```\n├── openclaw-simplified.yaml    # CloudFormation template (entire stack)\n├── agent-container/            # Docker container for AgentCore\n│   ├── server.py               # HTTP server wrapping OpenClaw\n│   ├── openclaw.json           # OpenClaw configuration\n│   ├── skills/                 # Custom skills (weather, notes, stocks, etc.)\n│   ├── community-skills.json   # ClawHub skills to auto-install at build time\n│   ├── Dockerfile\n│   └── requirements.txt\n├── discord-bot/                # Python Discord bot (runs on EC2)\n│   ├── bot.py                  # Bot using boto3 invoke-agent-runtime\n│   └── requirements.txt\n├── scripts/                    # Deployment \u0026 utility scripts\n│   ├── deploy.sh               # Full deployment (build + push + CFN)\n│   ├── quick-redeploy.sh       # Rebuild \u0026 push container only\n│   ├── deploy-discord-bot.sh   # Update bot on EC2 via SSM\n│   ├── install-community-skills.sh  # Auto-install ClawHub skills\n│   └── ...\n└── docs/                       # Documentation\n```\n\n## Key Features\n\n- **Serverless AI**: AgentCore Runtime — container freezes when idle, no idle costs\n- **Session persistence**: Conversations, memory, and workspace backed up to S3\n- **Memory consolidation**: [agent-memory-daemon](https://github.com/tverney/agent-memory-daemon) runs alongside OpenClaw — extracts facts, preferences, and decisions from sessions, deduplicates and prunes memory files, keeps MEMORY.md organized and size-budgeted\n- **EventBridge cron**: Scheduled tasks via EventBridge → Lambda → AgentCore (survives container freezes)\n- **Multi-platform**: Discord bot included, WhatsApp/Telegram/Slack via OpenClaw plugins\n- **Custom skills**: Weather, notes/reminders, stock watcher, soccer scores, personal assistant\n- **Community skills**: Auto-install from ClawHub via `community-skills.json` at build time\n- **Budget protection**: Tag-based budget tracking with SNS alerts\n- **Model flexibility**: Switch models by changing one line in `.env`\n\n## Documentation\n\n- [Deployment Guide](docs/DEPLOYMENT.md)\n- [Discord Setup](docs/DISCORD-SETUP.md)\n- [Configuration](docs/CONFIGURATION.md)\n- [Session Persistence](docs/SESSION-PERSISTENCE.md)\n- [Cost Optimization](docs/COST-OPTIMIZATION.md)\n- [Troubleshooting](docs/TROUBLESHOOTING.md)\n- [Inference Profiles](docs/INFERENCE-PROFILES.md)\n- [Security](docs/SECURITY.md)\n\n## FAQ\n\n**How much does it cost to run OpenClaw on AWS?**\nInfrastructure costs \\~$9-15/month: a t4g.nano EC2 for the Discord bot (\\~$4), public IPv4 (\\~$3.60), KMS (\\~$1), and pennies for ECR/S3/Secrets Manager. Model token costs are additional and depend on usage — typically $5-15/month for personal use with Haiku 4.5.\n\n**What's the cheapest way to host OpenClaw?**\nThis AgentCore setup is one of the cheapest at \\~$9/mo infra. If you use Telegram or WhatsApp instead of Discord (webhook-based, no EC2 needed), infra drops to \\~$1-2/mo. Lightsail is $24/mo flat. A full EC2 deployment runs $35-80/mo.\n\n**Can I run OpenClaw without EC2?**\nYes — the EC2 instance is only needed for the Discord bot (Discord requires a persistent WebSocket connection). If you use WhatsApp or Telegram (webhook-based), you can eliminate EC2 entirely and run fully serverless via API Gateway + Lambda + AgentCore.\n\n**How is this different from the Lightsail deployment?**\nLightsail runs OpenClaw on an always-on VM ($24/mo). This stack uses AgentCore Runtime where the container freezes when idle — you only pay for compute during active use. For a personal assistant used a few times a day, that's significantly cheaper.\n\n**Does this work with models other than Claude?**\nYes — switch models by changing one line in `.env`. Supports Claude Haiku 4.5, Claude Sonnet 4, Amazon Nova Lite, Nova Pro, DeepSeek R1, and any model available through Bedrock cross-region inference profiles.\n\n**Is my data secure?**\nAll secrets are stored in AWS Secrets Manager with KMS encryption. S3 bucket access is restricted to the execution role. IAM roles follow least-privilege per component. No ports are exposed to the internet. See the [Security section](#security) for details.\n\n**How long does deployment take?**\nAbout 10 minutes. `bash scripts/deploy.sh` handles everything: template validation, Docker build, ECR push, CloudFormation deploy, and Discord bot setup.\n\n## Resources\n\n- [Blog Post: How I Built It](https://builder.aws.com/content/3BUuc3XrsujHxoYbg4kgQ5qBiNV/personal-openclaw-on-aws-agentcore-for-dollar9mo-how-i-did-it) — detailed walkthrough on AWS Builder Center\n- [OpenClaw Docs](https://docs.openclaw.ai) · [OpenClaw GitHub](https://github.com/openclaw/openclaw)\n- [Amazon Bedrock Docs](https://docs.aws.amazon.com/bedrock/) · [AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-get-started.html)\n- [OpenClaw on Lightsail](https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-quick-start-guide-openclaw.html) (official AWS guide)\n- [Original AWS Sample](https://github.com/aws-samples/sample-OpenClaw-on-AWS-with-Bedrock) (forked from)\n\n## License\n\nSee [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftverney%2Fopenclaw-agentcore-personal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftverney%2Fopenclaw-agentcore-personal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftverney%2Fopenclaw-agentcore-personal/lists"}