Agent Skills › langwatch/langwatch › lambdasim

lambdasim

GitHub

本地模拟 AWS Lambda 和 CloudWatch Logs,用于 NLP 函数开发与调试。支持流式调用、错误注入(限流、404等)及 API 调用审计,无需真实 AWS 环境即可测试 Lambda 路径。

.claude/skills/lambdasim/SKILL.md langwatch/langwatch

Trigger Scenarios

haven lambda lambdasim haven up +lambda haven sim lambda NLP Lambda locally per-project Lambda LANGWATCH_NLP_LAMBDA_CONFIG in dev test the Lambda path without AWS force a Lambda throttle InvokeWithResponseStream locally

Install

npx skills add langwatch/langwatch --skill lambdasim -g -y
More Options

Non-standard path

npx skills add https://github.com/langwatch/langwatch/tree/main/.claude/skills/lambdasim -g -y

Use without installing

npx skills use langwatch/langwatch@lambdasim

指定 Agent (Claude Code)

npx skills add langwatch/langwatch --skill lambdasim -a claude-code -g -y

安装 repo 全部 skill

npx skills add langwatch/langwatch --all -g -y

预览 repo 内 skill

npx skills add langwatch/langwatch --list

SKILL.md

Frontmatter
{
    "name": "lambdasim",
    "description": "Run the studio's per-project NLP Lambda path locally with lambdasim, haven's AWS Lambda stand-in: functions, invokes and response streams answered on this stack's nlpgo. Use when someone says 'haven lambda', 'lambdasim', 'haven up +lambda', 'haven sim lambda', 'NLP Lambda locally', 'per-project Lambda', 'LANGWATCH_NLP_LAMBDA_CONFIG in dev', 'test the Lambda path without AWS', 'force a Lambda throttle', or 'InvokeWithResponseStream locally'.",
    "user-invocable": true
}

lambdasim

Answers the AWS Lambda and CloudWatch Logs calls the workflow module makes on its per-project NLP Lambda fleet, and runs every invoke on this stack's nlpgo, framed the way the image's Lambda Web Adapter frames it (AWS_LWA_INVOKE_MODE=RESPONSE_STREAM: JSON prelude, eight zero bytes, body). Code: services/sims/lambdasim, console apps/sims/src/lambda, spec specs/setup/haven-lambdasim.feature.

Run it

  • Opt-in: haven up +lambda (sticky; restarts the stack). Runs in the go lane by default (see sims).
  • The overlay sets LANGWATCH_NLP_LAMBDA_CONFIG to a placeholder fleet and points AWS_ENDPOINT_URL_LAMBDA and AWS_ENDPOINT_URL_CLOUDWATCH_LOGS at lambdasim, so the workflow module takes the per-project path (studio streams and synchronous runs). A fleet .env names wins, and then nothing is pointed at lambdasim.
  • Every invoke goes to LAMBDASIM_TARGET, this stack's nlpgo. The function's own environment (LANGWATCH_ENDPOINT, CACHE_BUCKET, ...) is recorded, not applied.
  • Console: https://lambda.<slug>.langwatch.localhost. Standalone: make service svc=lambdasim (:5594, nlpgo assumed at :5562).

What it fakes

GET|DELETE /2015-03-31/functions/{name}         GetFunction, DeleteFunction
POST       /2015-03-31/functions                 CreateFunction (409 when it exists)
PUT        /2015-03-31/functions/{name}/code|configuration
GET        /2015-03-31/functions                 ListFunctions (one page)
POST       /2015-03-31/functions/{name}/invocations                       Invoke
POST       /2021-11-15/functions/{name}/response-streaming-invocations    event stream
POST       /  (X-Amz-Target Logs_20140328.*)     log groups, retention, DescribeLogStreams

Functions live in memory. An invoke of an unknown name or ARN registers it rather than 404 (a cached ARN outlives a restart); force not-found to test the 404.

Force a failure

haven sim lambda fault <kind>, or the console's Forced error picker. Sticky until off.

kind answer
throttled 429 TooManyRequestsException (the invoke lane retries)
not-found 404 ResourceNotFoundException
function-error 200 + X-Amz-Function-Error: Unhandled; stream ends with InvokeComplete ErrorCode
service 500 ServiceException

nlpgo unreachable is a function error too, naming the dial failure.

Inspect and assert

GET    /_sim/api/info           stack, nlpgo target, functions, forced error
GET    /_sim/api/calls          newest first (function, mode, method, path, status, ms)
GET    /_sim/api/calls/{id}     with the event received and nlpgo's answer
DELETE /_sim/api/calls          reset; ids keep counting
GET|PUT /_sim/api/settings      {"forcedError": ""|"throttled"|"not-found"|"function-error"|"service"}

Caps: LAMBDASIM_MAX_CALLS (500) and LAMBDASIM_MAX_BODY_BYTES (65536 per body kept).

From a terminal or agent

--json on reads; non-zero exit on failure; --stack <slug> reads another worktree.

haven sim lambda status | list | get <id> | clear
haven sim lambda fault <off|throttled|not-found|function-error|service>

Version History

  • c0c14dc Current 2026-10-19 19:33

Same Skill Collection

.claude/skills/analyticssim/SKILL.md
.claude/skills/browser-pair/SKILL.md
.claude/skills/browser-test/SKILL.md
.claude/skills/chakra-ui-builder/SKILL.md
.claude/skills/chakra-ui-refactor/SKILL.md
.claude/skills/code-review/SKILL.md
.claude/skills/code-search/SKILL.md
.claude/skills/feature-map/SKILL.md
.claude/skills/githubsim/SKILL.md
.claude/skills/haven-auth/SKILL.md
.claude/skills/haven-db/SKILL.md
.claude/skills/haven-orb/SKILL.md
.claude/skills/haven-play/SKILL.md
.claude/skills/haven-seed/SKILL.md
.claude/skills/haven-setup/SKILL.md
.claude/skills/idpsim/SKILL.md
.claude/skills/langwatch-kanban/SKILL.md
.claude/skills/llmsim/SKILL.md
.claude/skills/mailsim/SKILL.md
.claude/skills/module/SKILL.md
.claude/skills/outboundsim/SKILL.md
.claude/skills/ownership/SKILL.md
.claude/skills/repo-tree/SKILL.md
.claude/skills/storagesim/SKILL.md
.claude/skills/voicesim/SKILL.md
plugins/langwatch/skills/langwatch/SKILL.md
services/langy-agent/skills/github/SKILL.md
skills/_compiled/native/agent-best-practices/SKILL.md
skills/_compiled/native/agent-performance/SKILL.md
skills/_compiled/native/automations/SKILL.md
skills/_compiled/native/code-changes/SKILL.md
skills/_compiled/native/context-sweet-spot/SKILL.md
skills/_compiled/native/daily-insights/SKILL.md
skills/_compiled/native/dashboard-widgets/SKILL.md
skills/_compiled/native/datasets/SKILL.md
skills/_compiled/native/debug-instrumentation/SKILL.md
skills/_compiled/native/debug-with-langwatch/SKILL.md
skills/_compiled/native/drive-the-ui/SKILL.md
skills/_compiled/native/eval-triage/SKILL.md
skills/_compiled/native/evaluate-multimodal/SKILL.md
skills/_compiled/native/evaluations/SKILL.md
skills/_compiled/native/experiments/SKILL.md
skills/_compiled/native/find-traces/SKILL.md
skills/_compiled/native/generate-rag-dataset/SKILL.md
skills/_compiled/native/github/SKILL.md
skills/_compiled/native/guided-onboarding/SKILL.md
skills/_compiled/native/level-up/SKILL.md
skills/_compiled/native/lwql-charts/SKILL.md
skills/_compiled/native/online-evaluations/SKILL.md

Metadata

Files
0
Version
c0c14dc
Hash
ce3e41a2
Indexed
2026-10-19 19:33

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 23:15
浙ICP备14020137号-1