A websocket server library designed for AWS Lambda and local development, version 0.1.21. It provides a simple handler-based API for connect, disconnect, default, and message events, automatically managing API Gateway WebSocket integrations. Key differentiator: works seamlessly both in AWS Lambda and locally, enabling testing without deployment. The package is lightweight, uses StandardJS style, and has no external dependencies. Release cadence is low (last update appears old). Supports Node.js only.
npm install aws-lambda-ws-serverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows full setup of a WebSocket handler for AWS Lambda with connect, disconnect, default, and message events, including echoing messages back.
Create a .d.ts file or use @types/aws-lambda for context.
Use require() or dynamic import() in ESM context.
Access ws.handler from the default export, not by destructuring.
Check latest commit or consider alternative packages.
Replace 'import ws from "aws-lambda-ws-server"' with 'const ws = require("aws-lambda-ws-server")'Run npm install aws-lambda-ws-server --save
Use: const ws = require('aws-lambda-ws-server'); ws.handler({...})No dependency data recorded yet.