跳到正文
cccskills
免费在 GitHub 公开

lambda-migration

Guides Phase 2 Lambda Container Migration steps. Pass a specific step number (2-1 through 2-5) to get the goals, deliverables, validation criteria, and detailed design for that step.

中文简介正在准备中。当前显示原文说明。

serithemage/serverless-openclaw星标 196(GitHub 196 + cccskills 0)
集成工具AWS

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md3.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Phase 2: Lambda Container Migration Guide

Step to implement: $ARGUMENTS

Implementation Procedure

  1. Read the detailed plan for the step in the references below
  2. Verify that dependent steps are completed
  3. Create/modify files specified in the deliverables
  4. Write tests first (TDD) before implementing
  5. Verify results according to validation criteria
  6. Update step status in docs/progress.md

References

Step Overview

StepTitleDependenciesKey Deliverables
2-1Lambda Container Image + HandlerNoneDockerfile, handler.ts, session-sync.ts
2-2CDK LambdaAgentStack2-1lambda-agent-stack.ts, ECR, IAM
2-3Response Streaming Integration2-1, 2-2routeMessage update, WS push, Telegram
2-4Session Lifecycle Management2-1, 2-3S3 lifecycle, locking, compaction
2-5Fargate Deprecation + Cost Verification2-1~2-4Feature flag, docs, cost dashboard

Critical Constraints (Must Check Every Step)

  • Zero OpenClaw code modifications — Wrapper layer only, upstream compatible
  • Zero fixed costs — No resources that incur charges while idle
  • No NAT Gateway — Lambda outside VPC (accesses S3 via public endpoint)
  • No secrets on disk — API keys via env vars (SSM SecureString resolved at runtime)
  • Backward compatible — Fargate path must remain functional as fallback
  • Cost target — Total monthly cost < $1 at low usage (< 100 requests)

Key Technical Details

OpenClaw Library Import

// Use extensionAPI.js — avoids CLI/Gateway initialization
import { runEmbeddedPiAgent } from "openclaw/dist/extensionAPI.js";

Session File Path Convention

S3: s3://{bucket}/sessions/{userId}/{sessionId}.jsonl
Lambda /tmp: /tmp/.openclaw/agents/default/sessions/{sessionId}.jsonl

SessionManager Behavior

  • SessionManager.open(path) → calls loadEntriesFromFile(path)
  • File not found → returns empty array (no error)
  • Uses sync fs: readFileSync, appendFileSync, writeFileSync
  • All operations work on Lambda /tmp

Config Initialization

// HOME=/tmp → OpenClaw reads /tmp/.openclaw/openclaw.json
process.env.HOME = '/tmp';
// Minimal config (no gateway server needed)
{ "gateway": { "mode": "local" } }

Post-Validation Tasks

After implementation of each step:

  1. Update step status in docs/progress.md
  2. Check if docs/architecture.md needs updating
  3. Run full test suite: npm run test && npm run test:e2e

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

References Serverless OpenClaw architecture. Covers network design, CDK stack structure, DynamoDB data model, API protocols, and container design.

中文简介正在准备中。当前显示原文说明。

serithemage/serverless-openclaw1962026年3月29日 更新

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.

中文简介正在准备中。当前显示原文说明。

serithemage/serverless-openclaw1962026年3月29日 更新

context

免费

Loads Serverless OpenClaw project context. Provides background knowledge needed for development including project overview, tech stack, architecture decisions, and data models.

中文简介正在准备中。当前显示原文说明。

serithemage/serverless-openclaw1962026年3月29日 更新

cost

免费

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.

中文简介正在准备中。当前显示原文说明。

serithemage/serverless-openclaw1962026年3月29日 更新

deploy

免费

Deploys Serverless OpenClaw CDK stacks to AWS. Handles SecretsStack parameter injection, full/individual stack deployment, and Docker image push.

中文简介正在准备中。当前显示原文说明。

serithemage/serverless-openclaw1962026年3月29日 更新

dev

免费

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.

中文简介正在准备中。当前显示原文说明。

serithemage/serverless-openclaw1962026年3月29日 更新

查看 serithemage 的全部技能

报告此技能的问题