References Serverless OpenClaw architecture. Covers network design, CDK stack structure, DynamoDB data model, API protocols, and container design.
中文简介正在准备中。当前显示原文说明。
References cold start optimization history and techniques. Covers Docker image optimization, Fargate CPU tuning, SOCI lazy loading, and Lambda Bedrock discovery fix. Use when optimizing startup performance.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Full analysis: docs/cold-start-optimization.md
| Target | Before | After | Savings |
|---|---|---|---|
| Docker image size | 2.22 GB | 1.27 GB | 43% reduction |
| Fargate cold start | ~120s (0.25 vCPU) | ~40-57s (1 vCPU) | ~80s |
| Lambda cold start | 56s | 1.35s | ~54s |
make cold-start # Full measurement (stops tasks + cleans TaskState first)
make cold-start-warm # Warm start measurement (skip idle wait)
make task-status # Verify task state before measuring
make task-stop # Stop all tasks
make task-stop-recent # Stop only most recent task
Important: Always use make cold-start — never run the measurement script directly without stopping existing tasks first.
| Optimization | Savings | Technique |
|---|---|---|
| Remove AWS CLI | -358 MB | Replaced aws s3 sync with @aws-sdk/client-s3 Node.js code (s3-sync.ts) |
| chown layer optimization | -134 MB | COPY --chown=openclaw:openclaw instead of separate RUN chown |
| Pre-generated openclaw config | — | Handled in Dockerfile (skip runtime onboard) |
| start-openclaw.sh simplification | — | Removed S3 restore/onboard/sleep 2 |
| zstd compression (P6) | -16% (258→217 MB) | --compression zstd in docker buildx |
./scripts/deploy-image.sh --soci # Linux only, ~50% additional pull-time reduction
SOCI CI: .github/workflows/deploy-image.yml
| CPU | Memory | Cold Start |
|---|---|---|
| 0.25 vCPU | 512 MB | OOM Kill |
| 0.25 vCPU | 2048 MB | ~120s |
| 0.5 vCPU | 2048 MB | ~80s |
| 1 vCPU | 2048 MB | ~40-57s (default) |
| 2 vCPU | 4096 MB | Configurable via env |
Configure via env vars: FARGATE_CPU, FARGATE_MEMORY
Promise.all (~3-5s saved)Root cause: Bedrock auto-discovery scanned all AWS regions on startup → 56s delay
Fix: bedrockDiscovery.enabled: false in OpenClaw config → 1.35s cold start
{
"bedrockDiscovery": { "enabled": false }
}
runEmbeddedPiAgent() — bypasses Gateway WS server (no :18789 socket bind)extensionAPI.js via file:// URL (not in exports map)| Version | Cold Start | Status |
|---|---|---|
| v2026.2.9 | 65.3s | Working |
| v2026.2.13 | 57.9s | Working — pinned |
| v2026.2.14 | N/A | BROKEN (scope system) |
Pin location: packages/container/Dockerfile
ARG OPENCLAW_VERSION=2026.2.13
Configurable via build-arg or env var.
now < prewarmUntil还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
References Serverless OpenClaw architecture. Covers network design, CDK stack structure, DynamoDB data model, API protocols, and container design.
中文简介正在准备中。当前显示原文说明。
Loads Serverless OpenClaw project context. Provides background knowledge needed for development including project overview, tech stack, architecture decisions, and data models.
中文简介正在准备中。当前显示原文说明。
References Serverless OpenClaw cost optimization guidelines. Validates that no resources exceeding the cost target ($1/month) are created during implementation. Use when writing CDK stacks or making infrastructure changes.
中文简介正在准备中。当前显示原文说明。
Deploys Serverless OpenClaw CDK stacks to AWS. Handles SecretsStack parameter injection, full/individual stack deployment, and Docker image push.
中文简介正在准备中。当前显示原文说明。
Development workflow guide. Covers build, test, lint, format commands, package structure, Git hooks, TDD methodology, and coding conventions. Use when setting up dev environment, running tests, or following project conventions.
中文简介正在准备中。当前显示原文说明。
Guides Phase 1 MVP implementation steps. Pass a specific step number as an argument to get the goals, deliverables, validation criteria, and detailed design for that step.
中文简介正在准备中。当前显示原文说明。