Amazon Lambda

@crvouga/mockingbird-service-lambda

Work-in-progress Amazon Lambda transport scaffold; vendor operations are not implemented.

Parity: Scaffold only; no vendor operations implemented or verifiedInfrastructure0 of 7 operationsIn-process fetchNode servermockingbird-lambda
$
npm install -D @crvouga/mockingbird-service-lambda

Playground

Requests go to the real emulator running in this tab. State persists across requests, and the journal shows what it received. A green dot marks operations whose sample succeeds as-is; others need ids from earlier responses.

Loads the real @crvouga/mockingbird-service-lambda into this tab on first send
https://lambda.us-east-1.amazonaws.com

Send a request to see the emulator's response.

Operations

0 of 7 operations in the vendored contract are emulated.

MethodPathOperationStatus
GET/AwsQueryNot emulated
POST/AwsRpcNot emulated
GET/{path}AwsRestGetNot emulated
POST/{path}AwsRestPostNot emulated
PUT/{path}AwsRestPutNot emulated
PATCH/{path}AwsRestPatchNot emulated
DELETE/{path}AwsRestDeleteNot emulated

Why each gap exists is recorded in SUPPORT.md.

Documentation

The package README, the same file that ships in the npm tarball.Edit on GitHub

Local emulators. Real API contracts. Part of Mockingbird.

Transport scaffold for Amazon Lambda. ESM; Node 22+ or Bun 1.2+.

Usage

TypeScript
import { ListFunctionsCommand, LambdaClient } from "@aws-sdk/client-lambda"
import { createServer } from "@crvouga/mockingbird-service-lambda/server"

// Test setup: the Lambda client your application already uses, pointed at the emulator.
const server = await createServer()
const lambda = new LambdaClient({
  endpoint: server.url,
  region: "us-east-1",
  credentials: { accessKeyId: "fixture", secretAccessKey: "fixture" },
})

// No Lambda operation is implemented yet, so every command rejects.
const outcome = await lambda.send(new ListFunctionsCommand({})).catch(() => "rejected")
// "rejected"

await server.close()

State lives in SQLite collections and participates in the shared runtime's namespace isolation, reset, timeline, clock, journal, metrics and fault controls. No AWS account is needed.

Planned, not implemented, AWS operations: CreateFunction, GetFunction, GetFunctionConfiguration, ListFunctions, UpdateFunctionConfiguration, UpdateFunctionCode, DeleteFunction, Invoke, PublishVersion, ListVersionsByFunction, CreateAlias, GetAlias, ListAliases, UpdateAlias, DeleteAlias, AddPermission, GetPolicy, RemovePermission, TagResource, UntagResource, ListTags, CreateEventSourceMapping, ListEventSourceMappings, DeleteEventSourceMapping.

Operations outside this list fail explicitly. This package emulates API state, not AWS infrastructure, production quotas, billing, IAM enforcement, or provider consoles. Service-specific omissions and oracle evidence are recorded in the AWS coverage ledger.

Run bun run parity with LocalStack on http://127.0.0.1:4566; an unavailable oracle fails the run. No LocalStack run is recorded for this integration. The parity command is a bounded read-only SDK envelope probe, not proof of full vendor equivalence.

Implementation status

No vendor operations are implemented. Requests fail explicitly with UnknownOperationException; transport tests cover this boundary and malformed input. This package is not a usable vendor replacement yet. No LocalStack or live AWS parity is claimed.

Install

Shell
bun add @crvouga/mockingbird-service-lambda

API

  • LambdaAPI(options?): low-level AWS transport instance with fetch and reset.

  • createRuntime(options?): in-process Fetch API and shared state controls.

  • createServer(options?) from the /server entry: HTTP listener with url, runtime, and close().

  • document, operationIds, and supportedOperationIds: generated transport contract metadata.

↑↓ to navigate↵ to open