Deploy openclaw (formerly Clawdbot) on AWS using Amazon Bedrock instead of managing Anthropic/OpenAI/DeepSeek API keys. Enterprise-ready, secure, one-click deployment with Graviton ARM processors.
English | 简体中文
openclaw (formerly Clawdbot/moltbot) is an open-source personal AI assistant that connects to WhatsApp, Slack, Discord, and more. This project provides an AWS-native deployment using Amazon Bedrock's unified API, eliminating the need to manage multiple API keys from different providers.
| Original openclaw | This Project |
|---|---|
| Multiple API keys (Anthropic/OpenAI/etc.) | Amazon Bedrock unified API + IAM |
| Single model, fixed cost | 8 models available, Nova 2 Lite (90% cheaper vs Anthropic) |
| x86 hardware, fixed specs | x86/ARM/Mac flexible, (Graviton Default, 20-40% savings) |
| Tailscale VPN | SSM Session Manager |
| Manual setup | CloudFormation (1-click) |
| No audit logs | CloudTrail (automatic) |
| Public internet | VPC Endpoints (private) |
1. Multi-Model Flexibility with Better Economics
- Nova Pro default: $0.80/$3.20 per 1M tokens vs Claude's $3/$15 (73% cheaper)
- 8 models available: Switch between Nova, Claude, DeepSeek, Llama with one parameter
- Smart routing: Use Nova Lite for simple tasks, Claude Sonnet for complex reasoning
- No vendor lock-in: Change models without code changes or redeployment
2. Flexible Instance Sizing with Graviton Advantage (Recommended)
- x86, ARM, and Mac support: Choose t3/c5 (x86), t4g/c7g (Graviton ARM), or mac2 (Apple Silicon)
- Graviton ARM recommended: 20-40% better price-performance than x86
- Cost example: t4g.medium ($24/mo) vs t3.medium ($30/mo) - same specs, 20% savings
- Mac for Apple development: mac2.metal ($468/mo) for iOS/macOS workflows
- Flexible sizing: Scale from t4g.small ($12/mo) to c7g.xlarge ($108/mo) as needed
- Energy efficient: Graviton uses 70% less power than x86
3. Enterprise Security & Compliance
- Zero API key management: IAM roles replace multiple provider keys
- Complete audit trail: CloudTrail logs every Bedrock API call
- Private networking: VPC Endpoints keep traffic within AWS
- Secure access: SSM Session Manager, no public ports
4. Cloud-Native Automation
- One-click deployment: CloudFormation automates VPC, IAM, EC2, Bedrock setup
- Infrastructure as Code: Reproducible, version-controlled deployments
- Multi-region support: Deploy in 4 regions with identical configuration
- 🔐 No API Key Management - IAM roles handle authentication automatically
- 🤖 Multi-Model Support - Switch between Claude, Nova, DeepSeek with one parameter
- 🏢 Enterprise-Ready - Full CloudTrail audit logs and compliance support
- 🚀 One-Click Deploy - CloudFormation automates everything in ~8 minutes
- 🔒 Secure Access - SSM Session Manager, no public ports exposed
- 💰 Cost Visibility - Native AWS cost tracking and optimization
Choose the deployment that fits your needs:
→ Deploy with AgentCore Runtime
⚠️ Work in Progress: AgentCore Runtime requires a custom Docker image that is not yet provided. You'll need to build it yourself before deploying. See README_AGENTCORE.md for details.
Best for variable workloads and cost optimization:
| Feature | AgentCore Runtime | Traditional EC2 |
|---|---|---|
| Scaling | ✅ Auto-scales with demand | ❌ Fixed capacity |
| Cost Model | ✅ Pay-per-use (no idle costs) | ❌ Pay 24/7 even when idle |
| Availability | ✅ Distributed across microVMs | |
| Container Isolation | ✅ Isolated microVMs per execution | |
| Management | ✅ Fully managed runtime |
Cost Example:
- Traditional EC2: $50/month (running 24/7)
- AgentCore: $15-30/month (pay only when agents execute)
- Savings: 40-70% for typical usage
→ Full AgentCore documentation and deployment guide
Traditional deployment with OpenClaw running on dedicated EC2 instances:
- Linux (Graviton/x86): Best price-performance with Graviton ARM
- macOS (Apple Silicon): For iOS/macOS development workflows
Choose this if you need:
- Predictable fixed costs
- Full control over the instance
- 24/7 availability regardless of usage
Why CloudFormation? Fully automated setup - no manual configuration needed. Just click, wait 8 minutes, and get your ready-to-use URL!
Just 3 steps:
- ✅ Click "Launch Stack" button below
- ✅ Select your EC2 key pair in the form
- ✅ Wait ~8 minutes → Check "Outputs" tab → Copy URL → Start using!
What happens automatically:
- Creates VPC, subnets, security groups
- Launches EC2 instance
- Installs Node.js, openclaw
- Configures Bedrock integration
- Generates secure gateway token
- Outputs ready-to-use URL with token
Click to deploy:
Linux (Graviton/x86) - Recommended
| Region | Launch Stack |
|---|---|
| US West (Oregon) | ![]() |
| US East (N. Virginia) | ![]() |
| EU (Ireland) | ![]() |
| Asia Pacific (Tokyo) | ![]() |
macOS (EC2 Mac) - For Apple Development
| Region | Launch Stack | Monthly Cost |
|---|---|---|
| US West (Oregon) | ![]() |
$468-792 |
| US East (N. Virginia) | ![]() |
$468-792 |
Mac instances: 24-hour minimum allocation, best for iOS/macOS development teams. Learn more →
Note: Using Global CRIS profiles - works in 30+ regions worldwide. Deploy in any region, requests auto-route to optimal locations.
🇨🇳 AWS China Region (Beijing/Ningxia)
For AWS China deployments using SiliconFlow (DeepSeek, Qwen, GLM) instead of Bedrock. Download clawdbot-china.yaml and upload via CloudFormation console.
→ Full China deployment guide (中国区部署指南)
After deployment (~8 minutes), check CloudFormation Outputs tab:
Chat with Kiro AI! Kiro will guide you through deployment and help configure your phone—no commands to remember.
- Install SSM Plugin: Click link in
Step1InstallSSMPlugin(one-time setup) - Port Forwarding: Copy command from
Step2PortForwarding, run on your computer (keep terminal open) - Open URL: Copy URL from
Step3AccessURL, open in browser (token included!) - Start Chatting: Connect WhatsApp/Telegram/Discord in Web UI
Before deploying:
- Before deploying, enable Bedrock models in Bedrock Console
- Create an EC2 key pair in your target region
- Lambda will automatically validate Bedrock access during deployment
aws cloudformation create-stack \
--stack-name openclaw-bedrock \
--template-body file://clawdbot-bedrock.yaml \
--parameters ParameterKey=KeyPairName,ParameterValue=your-keypair \
--capabilities CAPABILITY_IAM \
--region us-west-2
aws cloudformation wait stack-create-complete \
--stack-name openclaw-bedrock \
--region us-west-2# Get instance ID from CloudFormation Outputs, or:
INSTANCE_ID=$(aws cloudformation describe-stacks \
--stack-name openclaw-bedrock \
--query 'Stacks[0].Outputs[?OutputKey==`InstanceId`].OutputValue' \
--output text)
# Start port forwarding (keep this terminal open)
aws ssm start-session \
--target $INSTANCE_ID \
--region us-west-2 \
--document-name AWS-StartPortForwardingSession \
--parameters '{"portNumber":["18789"],"localPortNumber":["18789"]}'
# Open in browser (token is shown in CloudFormation Outputs > Step3AccessURL)
http://localhost:18789/?token=<your-token>For detailed configuration guides, visit openclaw Official Documentation.
- In Web UI: Click "Channels" → "Add Channel" → "WhatsApp"
- Scan QR Code: Use WhatsApp on your phone
- Open WhatsApp → Settings → Linked Devices
- Tap "Link a Device"
- Scan the QR code displayed
- Verify: Send a test message to your openclaw number
Tip: Use a dedicated phone number or enable selfChatMode for personal number.
📖 Full guide: https://docs.openclaw.ai/channels/whatsapp
- Create Bot: Message @BotFather
/newbot Choose a name: My openclaw Choose a username: my_openclaw_bot - Copy Token: BotFather will give you a token like
123456:ABC-DEF... - Configure: In Web UI, add Telegram channel with your bot token
- Test: Send
/startto your bot on Telegram
📖 Full guide: https://docs.openclaw.ai/channels/telegram
- Create Bot: Visit Discord Developer Portal
- Click "New Application"
- Go to "Bot" → "Add Bot"
- Copy bot token
- Enable intents: Message Content, Server Members
- Invite Bot: Generate invite URL with permissions
https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=8&scope=bot - Configure: In Web UI, add Discord channel with bot token
- Test: Mention your bot in a Discord channel
📖 Full guide: https://docs.openclaw.ai/channels/discord
- Create App: Visit Slack API
- Configure Bot: Add bot token scopes (chat:write, channels:history)
- Install: Install app to your workspace
- Configure: In Web UI, add Slack channel
- Test: Invite bot to a channel and mention it
📖 Full guide: https://docs.openclaw.ai/channels/slack
Microsoft Teams integration requires Azure Bot setup and is more complex.
📖 Full guide: https://docs.openclaw.ai/channels/msteams
Note: This integration requires additional configuration beyond the scope of this quick start.
openclaw doesn't have official Lark/Feishu support, but the community has created a plugin:
Community Plugin: https://www.npmjs.com/package/openclaw-feishu
Install on your EC2 instance to forward messages between Feishu and openclaw via WebSocket. No public IP or domain required.
Looking for optional extensions? See Community Skills for skills like S3 backup/restore, Kiro CLI integration, and S3 file sharing.
Via WhatsApp/Telegram/Discord: Just send a message!
You: What's the weather today?
openclaw: Let me check that for you...
Send these in any connected channel:
| Command | Description |
|---|---|
/status |
Show session status (model, tokens, cost) |
/new or /reset |
Start a new conversation |
/think high |
Enable deep thinking mode |
/help |
Show available commands |
WhatsApp/Telegram: Send voice notes directly - openclaw will transcribe and respond!
You: Open google.com and search for "AWS Bedrock"
openclaw: *Opens browser, performs search, returns results*
You: Remind me every day at 9am to check emails
openclaw: *Creates cron job*
Create ~/openclaw/system.md on the instance:
You are my personal assistant. Be concise and helpful.
Always respond in a friendly tone.Configure different agents for different channels in Web UI.
For detailed guides, visit openclaw Documentation.
Your Phone/Computer → WhatsApp/Telegram → EC2 (openclaw) → Bedrock (Claude)
↓
Your Data Stays Here
(Secure, Private, Audited)
┌─────────────┐
│ You │ Send message via WhatsApp/Telegram
└──────┬──────┘
│ (Internet)
▼
┌─────────────────────────────────────────────────────┐
│ AWS Cloud │
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ EC2 Instance │────────▶│ Bedrock │ │
│ │ (openclaw) │ IAM │ (Nova/Claude)│ │
│ └──────────────┘ Auth └──────────────┘ │
│ │ │ │
│ │ VPC Endpoints │ │
│ │ (Private Network) │ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ CloudTrail │ │ Cost Explorer│ │
│ │ (Audit Logs) │ │ (Billing) │ │
│ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────┘
│
▼ (Internet)
┌──────────────┐
│ You │ Receive response
└──────────────┘
Cost: ~$0.01/request | Time: 2-5s | Security: Private network
Key Components:
- EC2 Instance: Runs openclaw gateway (~500MB-1GB RAM)
- IAM Role: Authenticates with Bedrock (no API keys)
- SSM Session Manager: Secure access without public ports
- VPC Endpoints: Private network access to Bedrock
| Service | Configuration | Monthly Cost |
|---|---|---|
| EC2 (c7g.large, Graviton) | 2 vCPU, 4GB RAM | $52.60 |
| EBS (gp3) | 30GB | $2.40 |
| VPC Endpoints | 3 endpoints | $21.60 |
| Data Transfer | VPC endpoint processing | $5-10 |
| Subtotal | $76-81 |
| Model | Input | Output |
|---|---|---|
| Nova 2 Lite | $0.30/1M tokens | $2.50/1M tokens |
| Claude Sonnet 4.5 | $3/1M tokens | $15/1M tokens |
| Claude Haiku 4.5 | $1/1M tokens | $5/1M tokens |
| Nova Pro | $0.80/1M tokens | $3.20/1M tokens |
| DeepSeek R1 | $0.55/1M tokens | $2.19/1M tokens |
| Kimi K2.5 | $0.60/1M tokens | $3.00/1M tokens |
Example: 100 conversations/day with Nova 2 Lite ≈ $5-8/month
Total: ~$58-66/month for light usage
- Use Nova 2 Lite instead of Claude: 90% cheaper
- Use Graviton instances: 20-40% cheaper than x86
- Disable VPC endpoints: Save $22/month (less secure)
- Use Savings Plans: Save 30-40% on EC2
# In CloudFormation parameters
OpenClawModel:
- global.amazon.nova-2-lite-v1:0 # Default, most cost-effective
- global.anthropic.claude-sonnet-4-5-20250929-v1:0 # Most capable
- us.amazon.nova-pro-v1:0 # Balanced performance
- global.anthropic.claude-opus-4-5-20251101-v1:0 # Advanced reasoning
- global.anthropic.claude-haiku-4-5-20251001-v1:0 # Fast and efficient
- us.deepseek.r1-v1:0 # Open-source reasoning
- us.meta.llama3-3-70b-instruct-v1:0 # Open-source alternative
- moonshotai.kimi-k2.5 # Multimodal agentic, 262K contextModel Selection Guide:
- Nova 2 Lite (default): Most cost-effective, 90% cheaper than Claude, great for everyday tasks
- Claude Sonnet 4.5: Most capable for complex reasoning and coding
- Nova Pro: Best balance of performance and cost, supports multimodal
- DeepSeek R1: Cost-effective open-source reasoning model
- Kimi K2.5: Multimodal agentic model (text + vision), 262K context window, $0.60/$3.00 per 1M tokens
# Linux Instances
InstanceType:
# Graviton (ARM) - Recommended for best price-performance
- t4g.small # $12/month, 2GB RAM
- t4g.medium # $24/month, 4GB RAM (default)
- t4g.large # $48/month, 8GB RAM
- c7g.xlarge # $108/month, 8GB RAM, compute-optimized
# x86 - Alternative for broader compatibility
- t3.small # $15/month, 2GB RAM
- t3.medium # $30/month, 4GB RAM
- c5.xlarge # $122/month, 8GB RAM
# Mac Instances (separate template: clawdbot-bedrock-mac.yaml)
MacInstanceType:
- mac2.metal # $468/month, M1, 16GB RAM
- mac2-m2.metal # $632/month, M2, 24GB RAM
- mac2-m2pro.metal # $792/month, M2 Pro, 32GB RAMGraviton Benefits: ARM-based processors offer 20-40% better price-performance than x86.
Mac Use Cases: iOS/macOS development, Xcode automation, Apple ecosystem integration. Learn more →
CreateVPCEndpoints: true # Recommended for production
# Pros: Private network, more secure, lower latency
# Cons: +$22/month
CreateVPCEndpoints: false # For cost optimization
# Pros: Save $22/month
# Cons: Traffic goes through public internetEnableSandbox: true # Default: Docker installed
# Provides isolated execution for code in group chats
# Recommended for shared/team use
EnableSandbox: false # Skip Docker installation
# Faster deployment (~2 min saved)
# Use for personal/single-user deploymentsIAM roles eliminate API key risks. CloudTrail logs every API call. VPC Endpoints keep traffic private. Docker sandbox isolates execution.
Full details: SECURITY.md
Common issues: SSM connection, Web UI token mismatch, model configuration, port forwarding.
Full guide: TROUBLESHOOTING.md
If you want to access the EC2 instance directly via command line (similar to SSH), use SSM Session Manager:
# 1. Start an interactive session (replace with your instance ID and region)
aws ssm start-session --target i-xxxxxxxxxxxxxxxxx --region us-east-1
# 2. Switch to the ubuntu user
sudo su - ubuntu
# 3. Now you can run openclaw commands directly
openclaw --version
openclaw gateway statusTip: Your instance ID is shown in the CloudFormation Outputs tab under
InstanceId. Make sure you have the SSM Session Manager Plugin installed locally.
| Option | Monthly Cost | Best For | Deploy |
|---|---|---|---|
| Linux (Graviton) | $39-58 | Most users, best value | Launch → |
| macOS (M1/M2) | $468-792 | iOS/macOS development | Launch → |
Setup: Install on Mac Mini/PC, configure API keys, set up Tailscale VPN Cost: $20-30/month (API fees only, excludes $599 hardware + electricity) Models: Single provider (Anthropic/OpenAI), manual switching Security: API keys in config files, no audit logs Availability: Depends on your hardware and internet Scalability: Limited to single machine resources
Setup: One-click CloudFormation deployment, 8 minutes to ready Cost: $36-50/month all-inclusive (Graviton + Nova Pro + VPC) Models: 8 models via Bedrock, switch with one parameter Security: IAM roles (no keys), CloudTrail audit, VPC Endpoints Availability: 99.99% uptime with enterprise SLA Scalability: Elastic sizing (t4g.small to c7g.xlarge), orchestrate cloud resources
Bottom line: Cloud deployment costs similar but delivers enterprise-grade security, multi-model flexibility, and unlimited scalability. For teams, one cloud instance ($50/mo) serves 10+ people vs individual ChatGPT Plus subscriptions ($200/mo).
For iOS/macOS development teams only. Mac instances cost $468-792/month with 24-hour minimum allocation.
- ✅ iOS/macOS app development and CI/CD
- ✅ Xcode build automation
- ✅ Apple ecosystem integration (iCloud, APNs)
- ❌ General openclaw use (Linux is 12x cheaper)
| Type | Chip | RAM | Cost/Month | Best For |
|---|---|---|---|---|
| mac2.metal | M1 | 16GB | $468 | Standard builds |
| mac2-m2.metal | M2 | 24GB | $632 | Latest Silicon |
| mac2-m2pro.metal | M2 Pro | 32GB | $792 | High performance |
Click "Launch Stack" above in the macOS section. Important: You must specify an Availability Zone that supports Mac instances (check AWS Console first).
Access: Same as Linux (SSM Session Manager + port forwarding)
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
This deployment template is provided as-is. openclaw itself is licensed under its original license.
- openclaw Issues: GitHub Issues
- AWS Bedrock: AWS re:Post
- This Project: GitHub Issues
Built by builder + Kiro 🦞
90% of this project's code was generated through conversations with Kiro AI.
Deploy your personal AI assistant on AWS infrastructure you control.


