Skip to content
Back to search

sample-OpenClaw-on-AWS-with-Bedrock

OpenClaw on AWS with Bedrock

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/aws-samples/sample-OpenClaw-on-AWS-with-Bedrock with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/aws-samples/sample-OpenClaw-on-AWS-with-Bedrock'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/aws-samples--sample-openclaw-on-aws-with-bedrock/badge.svg)](/listings/aws-samples--sample-openclaw-on-aws-with-bedrock)

HTML

<a href="/listings/aws-samples--sample-openclaw-on-aws-with-bedrock"><img src="/api/listings/aws-samples--sample-openclaw-on-aws-with-bedrock/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

One-Click Deploy

1. Click "Launch Stack" for your region 2. Wait ~8 minutes 3. Check the Outputs tab

| Region | Launch | |--------|--------| | **US West (Oregon)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?stackName=openclaw-bedrock&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock.yaml) | | **US East (Virginia)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?stackName=openclaw-bedrock&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock.yaml) | | **EU (Ireland)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create/review?stackName=openclaw-bedrock&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock.yaml) | | **Asia Pacific (Tokyo)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-1#/stacks/create/review?stackName=openclaw-bedrock&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock.yaml) |

> **Prerequisites**: Bedrock model access is automatic — no manual enablement required. No SSH key needed — access via SSM Session Manager only.

After Deployment

> 🦞 **Just open the Web UI and say hi.** All messaging plugins (WhatsApp, Telegram, Discord, Slack, Feishu) are pre-installed. Tell your OpenClaw which platform you want to connect — it will guide you through the entire setup step by step. No manual configuration needed.

# 1. Install SSM Session Manager Plugin (one-time)
#    https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html

# 2. Start port forwarding (keep terminal open)
INSTANCE_ID=$(aws cloudformation describe-stacks \
  --stack-name openclaw-bedrock \
  --query 'Stacks[0].Outputs[?OutputKey==`InstanceId`].OutputValue' \
  --output text --region us-west-2)

aws ssm start-session \
  --target $INSTANCE_ID \
  --region us-west-2  # change to your deployment region \
  --document-name AWS-StartPortForwardingSession \
  --parameters '{"portNumber":["18789"],"localPortNumber":["18789"]}'

# 3. Get your token (in a second terminal)
TOKEN=$(aws ssm get-parameter \
  --name /openclaw/openclaw-bedrock/gateway-token \
  --with-decryption \
  --query Parameter.Value \
  --output text --region YOUR_REGION)

# 4. Open in browser
echo "http://localhost:18789/?token=$TOKEN"

CLI Deploy (Alternative)

aws cloudformation create-stack \
  --stack-name openclaw-bedrock \
  --template-body file://clawdbot-bedrock.yaml \
  --capabilities CAPABILITY_IAM \
  --region us-west-2

aws cloudformation wait stack-create-complete \
  --stack-name openclaw-bedrock --region us-west-2

🎯 Deploy with Kiro AI

Prefer a guided experience? [Kiro](https://kiro.dev/) walks you through deployment conversationally — just open this repo as a workspace and say "help me deploy OpenClaw".

**[→ Kiro Deployment Guide](QUICK_START_KIRO.md)**

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 558 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # OpenClaw on AWS with Bedrock
  2. > Your own AI assistant on AWS — connects to WhatsApp, Telegram, Discord, Slack. Powered by Amazon Bedrock. No API keys. One-click deploy. From ~$30/month.
  3. English | [简体中文](README_CN.md)
  4. > 🔱 **Sister project:** Prefer a self-improving Python agent? See **[Hermes Agent on AWS with Bedrock](https://github.com/JiaDe-Wu/sample-hermes-agent-on-aws-with-bedrock)** — same one-click CloudFormation + Bedrock deploy, built around an auto-learning agent loop.
  5. [![License](https://img.shields.io/badge/License-MIT--0-yellow?style=for-the-badge)](https://opensource.org/licenses/MIT)
  6. [![Amazon Bedrock](https://img.shields.io/badge/Powered_by-Amazon_Bedrock-FF9900?style=for-the-badge&logo=amazonaws&logoColor=white)](https://aws.amazon.com/bedrock/)
  7. [![CloudFormation](https://img.shields.io/badge/IaC-CloudFormation-232F3E?style=for-the-badge&logo=amazonaws&logoColor=white)](https://aws.amazon.com/cloudformation/)
  8. ## Why This Exists
  9. [OpenClaw](https://github.com/openclaw/openclaw) is the fastest-growing open-source AI assistant — it runs on your hardware, connects to your messaging apps, and actually does things: manages email, browses the web, runs commands, schedules tasks.
  10. The problem: setting it up means managing API keys from multiple providers, configuring VPNs, and handling security yourself.
  11. This project solves that. One CloudFormation stack gives you:
  12. - **Amazon Bedrock** for model access — 10 models, one unified API, IAM authentication (no API keys)
  13. - **Graviton ARM instances** — 20-40% cheaper than x86
  14. - **SSM Session Manager** — secure access without opening ports
  15. - **VPC Endpoints** — traffic stays on AWS private network
  16. - **CloudTrail** — every API call audited automatically
  17. Deploy in 8 minutes. Access from your phone.
  18. ## Quick Start
  19. ### One-Click Deploy
  20. 1. Click "Launch Stack" for your region
  21. 2. Wait ~8 minutes
  22. 3. Check the Outputs tab
  23. | Region | Launch |
  24. |--------|--------|
  25. | **US West (Oregon)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?stackName=openclaw-bedrock&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock.yaml) |
  26. | **US East (Virginia)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?stackName=openclaw-bedrock&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock.yaml) |
  27. | **EU (Ireland)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create/review?stackName=openclaw-bedrock&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock.yaml) |
  28. | **Asia Pacific (Tokyo)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-1#/stacks/create/review?stackName=openclaw-bedrock&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock.yaml) |
  29. > **Prerequisites**: Bedrock model access is automatic — no manual enablement required. No SSH key needed — access via SSM Session Manager only.
  30. ### After Deployment
  31. ![CloudFormation Outputs](images/20260305-215111.png)
  32. > 🦞 **Just open the Web UI and say hi.** All messaging plugins (WhatsApp, Telegram, Discord, Slack, Feishu) are pre-installed. Tell your OpenClaw which platform you want to connect — it will guide you through the entire setup step by step. No manual configuration needed.
  33. ```bash
  34. # 1. Install SSM Session Manager Plugin (one-time)
  35. # https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html
  36. # 2. Start port forwarding (keep terminal open)
  37. INSTANCE_ID=$(aws cloudformation describe-stacks \
  38. --stack-name openclaw-bedrock \
  39. --query 'Stacks[0].Outputs[?OutputKey==`InstanceId`].OutputValue' \
  40. --output text --region us-west-2)
  41. aws ssm start-session \
  42. --target $INSTANCE_ID \
  43. --region us-west-2 # change to your deployment region \
  44. --document-name AWS-StartPortForwardingSession \
  45. --parameters '{"portNumber":["18789"],"localPortNumber":["18789"]}'
  46. # 3. Get your token (in a second terminal)
  47. TOKEN=$(aws ssm get-parameter \
  48. --name /openclaw/openclaw-bedrock/gateway-token \
  49. --with-decryption \
  50. --query Parameter.Value \
  51. --output text --region YOUR_REGION)
  52. # 4. Open in browser
  53. echo "http://localhost:18789/?token=$TOKEN"
  54. ```
  55. ### CLI Deploy (Alternative)
  56. ```bash
  57. aws cloudformation create-stack \
  58. --stack-name openclaw-bedrock \
  59. --template-body file://clawdbot-bedrock.yaml \
  60. --capabilities CAPABILITY_IAM \
  61. --region us-west-2
  62. aws cloudformation wait stack-create-complete \
  63. --stack-name openclaw-bedrock --region us-west-2
  64. ```
  65. ### 🎯 Deploy with Kiro AI
  66. Prefer a guided experience? [Kiro](https://kiro.dev/) walks you through deployment conversationally — just open this repo as a workspace and say "help me deploy OpenClaw".
  67. **[→ Kiro Deployment Guide](QUICK_START_KIRO.md)**
  68. ---
  69. ## Connect Messaging Platforms
  70. Once deployed, connect your preferred platform in the Web UI under "Channels":
  71. | Platform | Setup | Guide |
  72. |----------|-------|-------|
  73. | **WhatsApp** | Scan QR code from your phone | [docs](https://docs.openclaw.ai/channels/whatsapp) |
  74. | **Telegram** | Create bot via [@BotFather](https://t.me/botfather), paste token | [docs](https://docs.openclaw.ai/channels/telegram) |
  75. | **Discord** | Create app in Developer Portal, paste bot token | [docs](https://docs.openclaw.ai/channels/discord) |
  76. | **Slack** | Create app at api.slack.com, install to workspace | [docs](https://docs.openclaw.ai/channels/slack) |
  77. | **Microsoft Teams** | Requires Azure Bot setup | [docs](https://docs.openclaw.ai/channels/msteams) |
  78. | **Lark / Feishu** | Community plugin: [openclaw-feishu](https://www.npmjs.com/package/openclaw-feishu) | — |
  79. **Full platform docs**: [docs.openclaw.ai](https://docs.openclaw.ai/)
  80. ---
  81. ## What Can OpenClaw Do?
  82. Once connected, just message it:
  83. ```
  84. You: What's the weather in Tokyo?
  85. You: Summarize this PDF [attach file]
  86. You: Remind me every day at 9am to check emails
  87. You: Open google.com and search for "AWS Bedrock pricing"
  88. ```
  89. | Command | What it does |
  90. |---------|-------------|
  91. | `/status` | Show model, tokens used, cost |
  92. | `/new` | Start fresh conversation |
  93. | `/think high` | Enable deep reasoning mode |
  94. | `/help` | List all commands |
  95. Voice messages work on WhatsApp and Telegram — OpenClaw transcribes and responds.
  96. ---
  97. ## Architecture
  98. ```
  99. You (WhatsApp/Telegram/Discord)
  100. │
  101. ▼
  102. ┌─────────────────────────────────────────────┐
  103. │ AWS Cloud │
  104. │ │
  105. │ EC2 (OpenClaw) ──IAM──▶ Bedrock │
  106. │ (public subnet) (Nova/Claude) │
  107. │ │ │
  108. │ Internet Gateway CloudTrail │
  109. │ (direct access) (audit logs) │
  110. └─────────────────────────────────────────────┘
  111. │
  112. ▼
  113. You (receive response)
  114. ```
  115. - **EC2**: Runs OpenClaw gateway in public subnet (~1GB RAM, c7g.large recommended)
  116. - **Bedrock**: Model inference via IAM (no API keys)
  117. - **SSM**: Secure access, no public ports
  118. - **Internet Gateway**: Direct internet access (no NAT Gateway cost)
  119. - **VPC Endpoints**: Optional private network to Bedrock (+$88/mo for 6 interface endpoints, S3 Gateway free)
  120. - **CloudWatch**: Auto-recovery, health monitoring, log shipping (optional, +$4/mo)
  121. ---
  122. ## Models
  123. Switch models with one CloudFormation parameter — no code changes:
  124. | Model | Input/Output per 1M tokens | Best for |
  125. |-------|---------------------------|----------|
  126. | **Nova 2 Lite** (default) | $0.30 / $2.50 | Everyday tasks, 90% cheaper than Claude |
  127. | Nova Pro | $0.80 / $3.20 | Balanced performance, multimodal |
  128. | Claude Opus 4.6 | $15.00 / $75.00 | Most capable, complex agentic tasks |
  129. | Claude Opus 4.5 | $15.00 / $75.00 | Deep analysis, extended thinking |
  130. | Claude Sonnet 4.5 | $3.00 / $15.00 | Complex reasoning, coding |
  131. | Claude Sonnet 4 | $3.00 / $15.00 | Reliable coding and analysis |
  132. | Claude Haiku 4.5 | $1.00 / $5.00 | Fast and efficient |
  133. | DeepSeek R1 | $0.55 / $2.19 | Open-source reasoning |
  134. | Llama 3.3 70B | — | Open-source alternative |
  135. | Kimi K2.5 | $0.60 / $3.00 | Multimodal agentic, 262K context |
  136. > Uses [Global CRIS profiles](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html) — deploy in any region, requests auto-route to optimal locations.
  137. ---
  138. ## Cost
  139. ### Typical Monthly Cost (Light Usage)
  140. | Component | Cost (us-west-2) | Optional |
  141. |-----------|------------------|----------|
  142. | EC2 (c7g.large, Graviton) | ~$53 | Default (2 vCPU, 4GB RAM) |
  143. | EBS (30GB gp3 x2) | $4.80 | Required (root + data volumes) |
  144. | CloudWatch Monitoring | ~$4 | ✅ Disable to save ~$4/mo |
  145. | VPC Endpoints (6 interface) | ~$88 | ✅ Enable for private network (+$88/mo, S3 Gateway free) |
  146. | ALB + CloudFront | $22.80 | ✅ Enable for public access (+$22.80/mo) |
  147. | AWS WAF | ~$10 | ✅ Only if deploy to us-east-1 (+$10/mo) |
  148. | Bedrock (Nova 2 Lite, ~100 conv/day) | $5.55 | Pay-per-use (~6M input + 1.5M output tokens/mo) |
  149. | **Total (default: VPCe OFF, monitoring ON)** | **~$67/mo** | EC2 + CloudWatch + Bedrock (saves $34/mo, no NAT) |
  150. | **Total (minimal: VPCe OFF, monitoring OFF)** | **~$63/mo** | Save ~$4/mo by disabling CloudWatch (saves $38/mo vs old default) |
  151. | **Total (VPC Endpoints ON)** | **~$155/mo** | Add ~$88/mo for 6 interface endpoints across 2 AZs (S3 Gateway free) |
  152. | **Total (public access, no WAF)** | **~$90/mo** | Add $22.80/mo (ALB + CloudFront) |
  153. | **Total (public + VPCe, no WAF)** | **~$178/mo** | Add $111/mo (VPCe + public access) |
  154. | **Total (full security: public + VPCe + WAF, us-east-1)** | **~$188/mo** | Add $121/mo (full security stack) |
  155. > **Cost optimization**: Use `t4g.medium` ($24/mo) or `r7g.medium` ($30/mo, 8GB RAM) instead of c7g.large to save ~$30/mo. Enable VPC Endpoints only if you need private network routing (adds ~$88/mo for 6 interface endpoints). **NAT Gateway removed** — saves $34/mo vs previous architecture.
  156. **Always included at no extra cost:**
  157. - 2GB swap (prevents OOM crashes)
  158. - Health check cron (port + HTTP + channel connectivity, every 5 min)
  159. - OS security patches (unattended-upgrades, automatic)
  160. - IMDSv2 enforcement (HttpTokens: required, no v1 fallback)
  161. - `openclaw doctor --fix` post-install validation
  162. - systemd memory limits (graceful restart before OOM at 80% memory)
  163. - Internet Gateway access (direct outbound connectivity, no NAT Gateway cost)
  164. - Node.js 22.22.0 pinned (prevents breakage from bad releases)
  165. - S3 Gateway VPC Endpoint (free, no hourly charge)
  166. **Pricing notes:**
  167. - All costs based on **AWS Official Pricing API** for **us-west-2** (accessed May 2026)
  168. - EC2 c7g.large: **$0.0725/hour** = **~$53/month** (verified via AWS Pricing API)
  169. - VPC Interface Endpoints: **$0.01/hour/AZ** × 2 AZs = **$14.60/month per endpoint**
  170. - **NAT Gateway removed**: Saves **$32.85/hour** + **~$1.80 data processing** = **~$34/month**
  171. ### Cost Breakdown by Configuration
  172. | Configuration | Monthly Cost | What You Get |
  173. |--------------|-------------|--------------|
  174. | **Default (VPCe OFF, monitoring ON)** | **~$67** | EC2 c7g.large ($53) + EBS 60GB ($4.80) + CloudWatch ($4) + Bedrock Nova 2 Lite ($5.55). Traffic via Internet Gateway to AWS public endpoints (TLS encrypted). SSM-only access. **Saves $34/mo** (no NAT Gateway). |
  175. | **Minimal (VPCe OFF, monitoring OFF)** | **~$63** | Above minus CloudWatch monitoring. Save ~$4/mo. Lose auto-recovery, health alarms, log shipping. **Saves $38/mo vs old architecture**. |
  176. | **Private Network (VPCe ON, monitoring ON)** | **~$155** | Default + 6 interface VPC endpoints across 2 AZs (**$14.60/endpoint/mo × 6 = $87.60**): Bedrock Runtime, Bedrock Mantle (conditional), SSM, SSM Messages, EC2 Messages, CloudWatch Logs. S3 Gateway endpoint free. Add **~$88/mo** (includes data processing). **All AWS API traffic stays on private network (never touches internet).** |
  177. | **Public Access (VPCe OFF, no WAF)** | **~$90** | Default + ALB ($22.27) + CloudFront ($0.53). Add **$22.80/mo**. HTTPS via CloudFront, but CloudFront→ALB uses HTTP (not end-to-end TLS). No Layer 7 WAF. |
  178. | **Public + Private Network (VPCe ON, no WAF)** | **~$178** | Above + 6 VPC endpoints. Add **$111/mo** total. |
  179. | **Full Security (public + VPCe + WAF, us-east-1 only)** | **~$188** | Above + AWS WAF (~$10): Web ACL + 5 managed rules (SQL injection, XSS, bad inputs, Linux protection, rate limiting 1000 req/5min). Add **$121/mo** total. ⚠️ **WAF only works in us-east-1** — other regions silently skip WAF (no Layer 7 protection, only Shield Standard Layer 3/4). |
  180. ### Save Money
  181. - **Use Nova 2 Lite instead of Claude** → 90% cheaper inference ($0.30 vs $3-15 per 1M input tokens). **Already default** ✅
  182. - **Use Graviton (ARM) instead of x86** → 20-40% cheaper EC2. c7g.large (~$53/mo) vs r5.large x86 ($92/mo). **Already default** ✅
  183. - **No NAT Gateway** → **Saves $34/mo** vs previous architecture. Instance in public subnet with direct Internet Gateway access. **New default** ✅
  184. - **Use smaller instance type** → **t4g.medium** ($24.53/mo, 4GB RAM) **saves $28.40/mo** (54% cheaper) vs c7g.large. Trade-off: Less CPU for Docker sandbox. Good for light usage (<10 users).
  185. - **Use r7g.medium** → $39.13/mo (8GB RAM) **saves $13.80/mo** (26% cheaper) vs c7g.large. More memory for plugins/embeddings, but only 1 vCPU.
  186. - **Default config (VPCe OFF)** → **saves ~$88/mo** vs private network. Traffic goes via Internet Gateway to AWS public endpoints (TLS encrypted). **Best cost/benefit ratio for most use cases.** ✅
  187. - **Skip public access** (`EnablePublicAccess=false`) → **saves $22.80/mo** (no ALB + CloudFront). Use SSM Session Manager only. **Already default** ✅
  188. - **Disable monitoring** (`EnableMonitoring=false`) → **saves ~$4/mo** (lose auto-recovery alarms, health metrics, log shipping to CloudWatch). Not recommended for production.
  189. - **AWS Savings Plans** → **30-40% off EC2** for 1-3 year commitment. c7g.large: ~$53/mo → **~$31.76-37.05/mo** (save $15-21/mo). Must commit to instance family (c7g). Best for long-term deployments.
  190. ### vs. Alternatives
  191. | Option | Cost | What you get |
  192. |--------|------|-------------|
  193. | ChatGPT Plus | $20/person/month | Single user, no integrations, web UI only |
  194. | **This project (1 user)** | **$67/month** | 3.4x more expensive, but full control + integrations |
  195. | **This project (3 users)** | **$22.33/person/month** | Close to ChatGPT, multi-user, WhatsApp/Telegram/Discord/Slack |
  196. | **This project (5 users)** | **$13.40/person/month** | 33% cheaper, economy of scale |
  197. | **This project (10 users)** | **$6.70/person/month** | 67% cheaper, way more features |
  198. | **This project (20 users)** | **$3.35/person/month** | 83% cheaper, enterprise scale |
  199. | **This project (50 users)** | **$1.34/person/month** | 93% cheaper, large organization |
  200. | Local Mac Mini | $0 server + $20-30 API | Hardware cost, manage yourself, electricity cost |
  201. **Break-even point: ~3-4 users** (same cost as ChatGPT Plus) — **improved from 5 users after NAT Gateway removal**
  202. ---
  203. ## Configuration
  204. ### Instance Types
  205. | Type | Monthly (us-west-2) | vCPU | RAM | Architecture | Use case |
  206. |------|---------------------|------|-----|-------------|----------|
  207. | t4g.small | $12 | 2 | 2GB | Graviton ARM | Personal (minimal), burstable |
  208. | **t4g.medium** | **$24.53** | **2** | **4GB** | **Graviton ARM** | **Best value (save $28.40/mo vs c7g.large)** |
  209. | t4g.large | $49 | 2 | 8GB | Graviton ARM | Medium teams, burstable |
  210. | **c7g.large** | **$53** | **2** | **4GB** | **Graviton ARM** | **Default (compute-optimized for Node.js + Docker)** |
  211. | c7g.xlarge | $106 | 4 | 8GB | Graviton ARM | Heavy compute workloads |
  212. | **r7g.medium** | **$39.13** | **1** | **8GB** | **Graviton ARM** | **Memory-optimized (save $13.80/mo, good for plugins/embeddings)** |
  213. | r7g.large | $78 | 2 | 16GB | Graviton ARM | Heavy usage / many plugins |
  214. | r5.large | $92 | 2 | 16GB | x86 | x86 compatibility + memory |
  215. **Cost source**: AWS Pricing API (accessed May 2026)
  216. ### Parameters
  217. | Parameter | Default | Description |
  218. |-----------|---------|-------------|
  219. | `OpenClawModel` | `global.amazon.nova-2-lite-v1:0` | Bedrock model ID - Nova 2 Lite offers best price-performance for everyday tasks. 10 models available: Nova 2 Lite, Claude Sonnet 4.5, Nova Pro, Claude Opus 4.6, Claude Opus 4.5, Claude Haiku 4.5, Claude Sonnet 4, DeepSeek R1, Llama 3.3 70B, Kimi K2.5 |
  220. | `OpenClawVersion` | `2026.4.27` | OpenClaw version. `2026.3.24` (no model approval needed, WeChat compatible), `2026.4.5` / `2026.4.10` / `2026.4.27` (auto-discovery, embeddings), or `latest` (not recommended for production) |
  221. | `InstanceType` | `c7g.large` | EC2 instance type. Graviton (ARM) recommended. **c7g = compute-optimized** (recommended, 2 vCPU for Node.js + Docker sandbox), **r7g/r6g = memory-optimized** (plugins, embeddings), **t4g = burstable** (cost-optimized). 14 ARM + 7 x86 instance types available |
  222. | `CreateVPCEndpoints` | `false` | Create VPC endpoints for private network access (**~$88/mo** for 6 interface endpoints across 2 AZs: Bedrock Runtime, Bedrock Mantle (conditional on region), SSM, SSM Messages, EC2 Messages, CloudWatch Logs. Each endpoint: **$0.01/hour/AZ × 2 AZs × 730 hours = $14.60/mo**. Plus data processing charges. S3 Gateway endpoint free). **Default OFF to minimize cost**. Traffic goes via Internet Gateway to AWS public HTTPS endpoints instead (TLS encrypted, no security downside for most use cases). Enable only if compliance requires private network routing (adds **~$88/mo**). |
  223. | `EnableMonitoring` | `true` | Enable CloudWatch monitoring, EC2 auto-recovery + reboot alarms, metrics (memory, disk, swap), and log shipping (~$4/mo). **Recommended ON** for production |
  224. | `EnableSandbox` | `true` | Install Docker for sandboxed command execution (recommended for group chats and untrusted code). Adds ~500MB disk usage |
  225. | `EnableDataProtection` | `false` | Retain both EBS volume and S3 bucket when stack is deleted (protects against accidental data loss). **Set to true for production** |
  226. | `EnablePublicAccess` | `false` | Enable public HTTPS access via ALB + CloudFront (~$25/mo). When disabled, access via SSM Session Manager only (secure, no open ports). **⚠️ Security Note**: CloudFront → ALB connection uses HTTP (not HTTPS), meaning origin traffic is unencrypted. This is an accepted tradeoff for simplicity. For full end-to-end encryption, add ACM certificate + HTTPS ALB listener (see SECURITY.md). |
  227. | `EnableWAF` | `true` | Enable AWS WAF for CloudFront (Layer 7 DDoS protection, SQL injection, XSS, bad inputs, rate limiting 1000 req/5min, ~$10/mo). **⚠️ CRITICAL LIMITATION: WAF only works in us-east-1.** If you deploy in other regions (e.g., us-west-2, ap-northeast-1, eu-west-1), the WAF will be silently skipped and you won't get Layer 7 protection. Deploy in us-east-1 to enable WAF, or accept that other regions only get Shield Standard (Layer 3/4 DDoS protection). |
  228. | `AllowedCountries` | _(empty)_ | CloudFront geographic restrictions (geo-blocking). Leave empty (default) to allow worldwide access, or specify comma-separated ISO 3166-1 alpha-2 country codes to restrict access to specific countries only (e.g., `AU,US,GB,JP`). Useful for compliance (GDPR, data residency) |
  229. ---
  230. ## Deployment Options
  231. ### Standard (EC2) — This README
  232. Best for most users. Fixed cost, full control, 24/7 availability.
  233. ### Multi-Tenant Platform (AgentCore Runtime) — [README_ENTERPRISE.md](README_ENTERPRISE.md)
  234. > ✅ **E2E verified** — Full pipeline running: IM → Gateway → Bedrock H2 Proxy → Tenant Router → AgentCore Firecracker microVM → OpenClaw CLI → Bedrock → response. [Demo Guide →](demo/README.md)
  235. Turn OpenClaw from a single-user tool into an enterprise platform: every employee gets an isolated AI assistant in a Firecracker microVM, with shared skills, centralized governance, and per-tenant permissions. Zero changes to OpenClaw code.
  236. ```
  237. Telegram/WhatsApp message
  238. → OpenClaw Gateway (IM channels, Web UI)
  239. → Bedrock H2 Proxy (intercepts AWS SDK HTTP/2 calls)
  240. → Tenant Router (derives tenant_id per employee)
  241. → AgentCore Runtime (Firecracker microVM, per-tenant isolation)
  242. → OpenClaw CLI → Bedrock Nova 2 Lite
  243. → Response returns to employee's IM
  244. ```
  245. | What you get | How | Status |
  246. |---|---|---|
  247. | Tenant isolation | Firecracker microVM per user (AgentCore Runtime) | ✅ Verified |
  248. | Shared model access | One Bedrock account, per-tenant metering (~$1-2/person/month) | ✅ Verified |
  249. | Per-tenant permission profiles | SSM-based rules, Plan A (prompt injection) + Plan E (audit) | ✅ Verified |
  250. | IM channel management | Same setup as single-user (WhatsApp/Telegram/Discord) | ✅ Verified |
  251. | Zero OpenClaw code changes | All management via external layers (proxy, router, entrypoint) | ✅ Verified |
  252. | Shared skills with bundled SaaS keys | Install once, authorize per tenant | 🔜 Next |
  253. | Human approval workflow | Auth Agent → admin notification → approve/reject | 🔜 Next |
  254. | Elastic compute | Auto-scaling microVMs, burst capacity, pay-per-use | ✅ Verified |
  255. | Metric | Value |
  256. |--------|-------|
  257. | Cold start (user-perceived) | ~3s (fast-path direct Bedrock) |
  258. | Cold start (real microVM) | ~22-25s (background, user doesn't wait) |
  259. | Warm request | ~5-10s |
  260. | Cost for 50 users | ~$65-110/month (~$1.30-2.20/person) |
  261. | vs ChatGPT Plus (50 users) | $1,000/month |
  262. **[→ Full Multi-Tenant Guide](README_ENTERPRISE.md)** · **[→ Roadmap](ROADMAP.md)**
  263. ### 🏢 Enterprise Digital Workforce Platform — [enterprise/](enterprise/)
  264. > **NEW** — Turn OpenClaw into a centrally managed digital workforce for your entire organization. Each employee gets a role-specific AI agent with unique identity, permissions, memory, and knowledge — all governed by IT, without modifying a single line of OpenClaw code.
  265. Built on top of the Multi-Tenant AgentCore Runtime, the Enterprise platform adds:
  266. ```
  267. ┌─────────────────────────────────────────────────────────┐
  268. │ Admin Console (19 pages) + Employee Portal (5 pages) │
  269. │ React + Tailwind + FastAPI + DynamoDB + S3 │
  270. ├─────────────────────────────────────────────────────────┤
  271. │ Three-Layer SOUL Architecture │
  272. │ Global (IT locked) → Position (dept admin) → Personal │
  273. │ Same LLM, completely different agent identities │
  274. ├─────────────────────────────────────────────────────────┤
  275. │ Enterprise Controls │
  276. │ RBAC (admin/manager/employee) · Skill governance │
  277. │ Audit trail + AI anomaly detection · Usage tracking │
  278. │ Memory persistence · Knowledge base (Markdown in S3) │
  279. └─────────────────────────────────────────────────────────┘
  280. ```
  281. | Design Principle | What It Means |
  282. |-----------------|--------------|
  283. | Zero invasion | Controls OpenClaw via workspace files (SOUL.md, TOOLS.md). No fork, no patch. Upgrade OpenClaw independently. |
  284. | Serverless-first | Firecracker microVM per request via AgentCore. 20 agents = ~$65/mo (vs ChatGPT Team $500/mo). |
  285. | Security by design | No open ports, no hardcoded credentials, tenant isolation, IAM least privilege, comprehensive audit. |
  286. | File-first knowledge | Markdown in S3, not a vector DB. Zero infra cost, human-readable, scope-controlled. |
  287. | What's Included | Details |
  288. |----------------|---------|
  289. | 24 pages | Dashboard, Org Tree, Agents, SOUL Editor, Workspace, Skills, Knowledge, Monitor, Audit, Usage, Approvals, Settings, Playground + 5 Portal pages |
  290. | 35+ API endpoints | FastAPI with DynamoDB single-table design, S3 operations, JWT auth |
  291. | 3-role RBAC | Admin (full), Manager (department-scoped), Employee (portal only) |
  292. | 10 SOUL templates | SA, SDE, DevOps, QA, AE, PM, Finance, HR, CSM, Legal |
  293. | 26 skills | Role-filtered with `allowedRoles`/`blockedRoles` manifests |
  294. | Sample org | 20 employees, 20 agents, 13 departments — seed scripts included |
  295. **[→ Enterprise Platform Guide](README_ENTERPRISE.md)** · **[→ Enterprise Roadmap](enterprise/ROADMAP.md)**
  296. ### EKS (Kubernetes) — For Container-Native Deployments
  297. Run OpenClaw agents on Amazon EKS with Terraform. Supports AWS Global and China regions.
  298. **[→ EKS Deployment Guide (EN)](docs/DEPLOYMENT_EKS.md)** · **[→ EKS 部署指南 (中文)](docs/DEPLOYMENT_EKS_CN.md)**
  299. ### macOS (Apple Silicon) — For iOS/macOS Development
  300. | Type | Chip | RAM | Monthly |
  301. |------|------|-----|---------|
  302. | mac2.metal | M1 | 16GB | $468 |
  303. | mac2-m2.metal | M2 | 24GB | $632 |
  304. | mac2-m2pro.metal | M2 Pro | 32GB | $792 |
  305. > 24-hour minimum allocation. Only use for Apple development workflows — Linux is 12x cheaper for general use.
  306. | Region | Launch |
  307. |--------|--------|
  308. | **US West (Oregon)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?stackName=openclaw-mac&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock-mac.yaml) |
  309. | **US East (Virginia)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?stackName=openclaw-mac&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-bedrock-mac.yaml) |
  310. ### 🇨🇳 AWS China (Beijing/Ningxia)
  311. Uses SiliconFlow (DeepSeek, Qwen, GLM) instead of Bedrock. Requires a SiliconFlow API key.
  312. | Region | Launch |
  313. |--------|--------|
  314. | **cn-north-1 (Beijing)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://cn-north-1.console.amazonaws.cn/cloudformation/home?region=cn-north-1#/stacks/create/review?stackName=openclaw-china&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-china.yaml) |
  315. | **cn-northwest-1 (Ningxia)** | [![Launch Stack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://cn-northwest-1.console.amazonaws.cn/cloudformation/home?region=cn-northwest-1#/stacks/create/review?stackName=openclaw-china&templateURL=https://sharefile-jiade.s3.cn-northwest-1.amazonaws.com.cn/clawdbot-china.yaml) |
  316. **[→ China Deployment Guide (中国区部署指南)](docs/DEPLOYMENT_CHINA_REGION.md)**
  317. ---
  318. ## Security
  319. | Layer | What it does |
  320. |-------|-------------|
  321. | **No SSH** | Zero SSH keys, zero SSH ports. SSM Session Manager only. |
  322. | **IAM Roles** | No API keys — automatic credential rotation via EC2 instance profile |
  323. | **IMDSv2 Enforced** | Instance metadata requires secure token (`HttpTokens: required`, no v1 fallback) |
  324. | **SSM Session Manager** | No public ports (22/3389/18789), session logging, encrypted tunnel |
  325. | **VPC Endpoints (optional)** | Bedrock + SSM traffic stays on AWS private network (never touches internet) |
  326. | **SSM Parameter Store** | Gateway token stored as SecureString (KMS-encrypted), never written to disk |
  327. | **Supply-chain protection** | Docker via GPG-signed repos, NVM via download-then-execute (no `curl \| sh`), npm registry hardcoded |
  328. | **Docker Sandbox** | Isolates code execution in group chats (prevents host compromise) |
  329. | **CloudTrail** | Every Bedrock API call audited (who, when, what model, what input/output) |
  330. | **Public subnet (no public IP)** | EC2 in public subnet without public IP, outbound via Internet Gateway |
  331. | **Security groups** | Minimal ingress (ALB only if public access enabled), full egress |
  332. | **Network ACLs** | Stateless firewall on VPC endpoint subnets (conditional, HTTPS + ephemeral only) |
  333. ### ⚠️ WAF Regional Limitation
  334. AWS WAF for CloudFront distributions **must be created in us-east-1** due to CloudFront being a global service. This means:
  335. - ✅ **Deploy in us-east-1**: Full WAF protection (SQL injection, XSS, rate limiting, bad inputs)
  336. - ⚠️ **Deploy in other regions** (us-west-2, ap-northeast-1, eu-west-1, etc.): WAF is **silently skipped**
  337. - You still get AWS Shield Standard (Layer 3/4 DDoS protection) — always enabled, no cost
  338. - You still get CloudFront managed prefix list (ALB only accepts traffic from CloudFront)
  339. - You still get custom header validation (prevents direct ALB access)
  340. - You **DON'T get** Layer 7 WAF protections (SQL injection, XSS, rate limiting)
  341. **Recommendation**: If Layer 7 WAF is critical for your use case, deploy the stack in us-east-1. Your EC2 instance and Bedrock requests will still be regional (low latency), only the CloudFront WAF needs to be in us-east-1.
  342. **[→ Full Security Guide](SECURITY.md)**
  343. ---
  344. ## Reliability
  345. The stack includes multiple layers of self-healing (always enabled, no extra cost):
  346. | Layer | What it does | Frequency |
  347. |-------|-------------|----------|
  348. | **Port health check** | Detects dead gateway process, auto-restarts | Every 5 min |
  349. | **HTTP health check** | Detects hung/deadlocked gateway, auto-restarts | Every 5 min |
  350. | **Channel monitoring** | Detects disconnected Telegram/Discord/WhatsApp via `openclaw status`, auto-restarts | Every 30 min |
  351. | **systemd Restart=always** | Auto-restarts on crash | Immediate |
  352. | **2GB swap** | Prevents hard OOM kills on low-memory instances | Always on |
  353. | **systemd MemoryMax** | Graceful restart at 80% memory (before OOM killer) | Always on |
  354. | **Node.js version pin** | Prevents breakage from bad Node releases (pinned to 22.22.0) | At install |
  355. | **OS security patches** | Unattended-upgrades for security fixes | Daily |
  356. | **`openclaw doctor`** | Config validation and auto-repair post-install | At install |
  357. **With `EnableMonitoring=true` (default, +$4/mo):**
  358. | Layer | What it does |
  359. |-------|-------------|
  360. | **EC2 auto-recovery** | Recovers instance on underlying hardware failure |
  361. | **EC2 reboot alarm** | Reboots on instance status check failure |
  362. | **CloudWatch metrics** | Memory, disk, swap usage (5-min intervals) |
  363. | **CloudWatch Logs** | Setup, health check, and update logs shipped to CloudWatch |
  364. ---
  365. ## Community Skills
  366. Optional extensions for OpenClaw:
  367. - [S3 Files Skill](skills/s3-files-skill/) — Upload and share files via S3 with pre-signed URLs (auto-installed by default)
  368. - [Kiro CLI Skill](skills/openclaw-kirocli-skill/) — AI-powered coding via Kiro CLI
  369. - [AWS Backup Skill](https://github.com/genedragon/openclaw-aws-backup-skill) — S3 backup/restore with optional KMS encryption
  370. ---
  371. ## Shell Access via SSM (No SSH)
  372. The instance has **no SSH key** and **no SSH port** open. All access is via SSM Session Manager.
  373. ```bash
  374. # Start interactive session (get instance ID from CloudFormation Outputs)
  375. aws ssm start-session --target i-xxxxxxxxx --region us-west-2
  376. # Switch to ubuntu user
  377. sudo su - ubuntu
  378. # Run OpenClaw commands
  379. openclaw --version
  380. openclaw gateway status
  381. openclaw doctor --fix
  382. # View logs
  383. journalctl -u openclaw-gateway.service -f
  384. tail -f ~/.openclaw/*.log
  385. # Alternative: Use EC2 Console > right-click instance > Connect > Session Manager
  386. ```
  387. **Why no SSH?** SSM is more secure:
  388. - No exposed port 22 (reduces attack surface)
  389. - Automatic session logging to CloudTrail/S3
  390. - Temporary credentials (no long-lived SSH keys)
  391. - IAM-based access control (no key rotation)
  392. - Encrypted tunnels (AES-256)
  393. ---
  394. ## Troubleshooting
  395. Common issues and fixes: [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
  396. Step-by-step deployment guide: [DEPLOYMENT.md](DEPLOYMENT.md)
  397. ---
  398. ## Contributing
  399. We're building the enterprise OpenClaw platform in the open — from single-user deployment to multi-tenant digital workforce. Whether you're an enterprise architect, a skill developer, a security researcher, or just someone who wants a better AI assistant, there's a place for you.
  400. Areas where we need help most:
  401. - Enterprise platform testing (RBAC, SOUL injection, permission boundaries)
  402. - End-to-end multi-tenant testing
  403. - Skills with bundled SaaS credentials (Jira, Salesforce, SAP)
  404. - Agent-to-agent orchestration
  405. - Cost benchmarking (AgentCore vs EC2)
  406. - Security audits and penetration testing
  407. **[→ Roadmap](ROADMAP.md)** · **[→ Contributing Guide](CONTRIBUTING.md)** · **[→ GitHub Issues](https://github.com/aws-samples/sample-OpenClaw-on-AWS-with-Bedrock/issues)**
  408. ## Resources
  409. - [OpenClaw Docs](https://docs.openclaw.ai/) · [OpenClaw GitHub](https://github.com/openclaw/openclaw)
  410. - [Amazon Bedrock Docs](https://docs.aws.amazon.com/bedrock/) · [SSM Session Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager.html)
  411. - [OpenClaw on Lightsail](https://aws.amazon.com/blogs/aws/introducing-openclaw-on-amazon-lightsail-to-run-your-autonomous-private-ai-agents/) (official AWS blog)
  412. ## Support
  413. - **This Project**: [GitHub Issues](https://github.com/aws-samples/sample-OpenClaw-on-AWS-with-Bedrock/issues)
  414. - **OpenClaw**: [GitHub Issues](https://github.com/openclaw/openclaw/issues) · [Discord](https://discord.gg/openclaw)
  415. - **AWS Bedrock**: [AWS re:Post](https://repost.aws/tags/bedrock)
  416. ---
  417. **Built with Kiro** 🦞

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.