qmetrics.net

Middy.js

Middleware engine for Node.js AWS Lambda handlers

Middy.js screenshot

Middy.js wraps AWS Lambda handlers with composable middleware for validation, auth, logging, error mapping, and AWS event sources. It ships dozens of official packages for API Gateway, queues, streams, and more.

Overview

Middy is a middleware engine tailored to Node.js functions on AWS Lambda. You keep a slim handler for domain logic and chain middleware steps that handle parsing, security headers, CORS, secrets loading, structured errors, and partial-batch failures for streaming event sources.

The core stays small and ESM-first, depending mainly on shared utilities rather than bundling the AWS SDK. TypeScript types ship with the packages, and the maintainers target current Node.js releases. Official middleware covers API Gateway HTTP and REST, WebSockets, Function URLs, SQS, SNS, S3, DynamoDB streams, EventBridge, Kinesis, Kafka, and CloudFormation custom resources, plus routers that dispatch within one function.

Documentation positions Middy for production handlers where repeated non-functional code would otherwise be copied into every file: input validation at trust boundaries, consistent HTTP error shapes, cached secrets prefetch, auth for public endpoints, and graceful timeout responses. Teams can author custom middleware or extend lifecycle hooks when built-ins are not enough.

Lambda response streaming and durable function workflows receive first-class support in recent releases. The project is MIT-licensed, documents integration with AWS Lambda Powertools concepts, and is installed via npm scoped packages such as the core engine and individual middleware modules.

Key features

  • Composable Lambda handler middleware chains
  • Official packages for major AWS triggers
  • HTTP, WebSocket, and CloudFormation routers
  • TypeScript types and ESM packaging
  • Input validation and error response mapping
  • Partial batch failure helpers for queues
  • Response streaming and durable function support
  • Custom middleware and hook extension points

Use cases

  • API Gateway REST or HTTP Lambda APIs
  • SQS consumers with partial batch reporting
  • Standardizing auth and logging across functions
  • WebSocket Lambda connection handlers
  • Reducing duplicated Lambda boilerplate

Tags

Similar software

Vite

Frontend build tool for modern web projects

Vite is a build tool for modern web projects, combining a development server with an optimized production build. It targets a faster, leaner local development workflow.

★ 84.2k⟳ yesterdayMIT
Build & DeploymentDesktop/CLI app

Moby

Modular toolkit for assembling container systems

Moby bundles container build, runtime, registry, and orchestration components so integrators can craft custom container platforms instead of using a single fixed product.

★ 72.3k⟳ todayApache-2.0

Appwrite

Agent-ready open-source backend cloud with unified app services

Appwrite bundles auth, databases, storage, functions, messaging, realtime, hosting, and firewall for building apps. It runs as managed cloud or self-hosted on Docker

★ 58.7k⟳ todayBSD-3-Clause
Build & DeploymentSelf-hostable
Open Source Alternative to:Auth0Clerk+1

Wails

Go and web frontend toolkit for desktop apps

Wails bundles Go backends with HTML, CSS, and JavaScript UIs into native desktop binaries. It uses OS WebViews instead of shipping a full browser runtime.

★ 37.2k⟳ yesterdayMIT

Electron React Boilerplate

Electron and React starter for desktop applications

Electron React Boilerplate combines Electron, React, React Router, and Vite tooling so teams can develop, hot-reload, and package cross-platform desktop apps from one template.

★ 24.2k⟳ 2 months agoMIT

JHipster

Full-stack generator for web apps and microservices

JHipster is a development platform that scaffolds, develops, and deploys modern web applications and microservice architectures. It wires front ends, back ends, and cloud-native deployment in one workflow.

★ 22.5k⟳ todayApache-2.0