본문으로 건너뛰기
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(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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 / 1,000자

이 양식은 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의 스킬 모두 보기

이 스킬의 문제 신고