# dherault/serverless-offline

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/dherault-serverless-offline).**

5,257 stars · 807 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/dherault/serverless-offline
- awesome-repositories: https://awesome-repositories.com/repository/dherault-serverless-offline.md

## Topics

`aws-apigateway` `aws-lambda` `serverless`

## Description

serverless-offline is a Serverless Framework plugin that provides a local cloud infrastructure simulator. It acts as an AWS Lambda local emulator and AWS API Gateway mock, allowing for the development and testing of serverless functions on a local machine without deploying to a remote provider.

The project distinguishes itself by simulating bidirectional WebSocket connections and message routing, as well as mimicking the request lifecycle of an HTTP gateway. It includes a mock identity authorizer pipeline to verify tokens and JWTs locally and supports the mounting of virtual dependency layers into the execution environment.

Broadly, the tool covers function execution across multiple runtimes with isolated execution modes, cloud gateway emulation for request routing, and the simulation of scheduled event triggers for time-based logic. It also provides capabilities for SDK invocation simulation and request context mocking to facilitate local integration testing.

## Tags

### Development Tools & Productivity

- [Local Serverless Emulation](https://awesome-repositories.com/f/development-tools-productivity/local-serverless-emulation.md) — Emulates the full serverless stack locally, including an HTTP server that mimics cloud gateway request lifecycles.
- [Gateway Service Mocks](https://awesome-repositories.com/f/development-tools-productivity/api-development-tools/api-mocking-services/gateway-service-mocks.md) — Mimics the request lifecycle, routing, and authorizers of the AWS API Gateway.
- [Local Lambda Simulation](https://awesome-repositories.com/f/development-tools-productivity/local-development-environments/local-lambda-simulation.md) — Runs and tests serverless functions on a local machine by mocking event servers to process requests.
- [Local Function Execution](https://awesome-repositories.com/f/development-tools-productivity/local-function-execution.md) — Executes serverless functions locally using worker threads or containers to verify business logic. ([source](https://github.com/dherault/serverless-offline/blob/master/README.md))
- [Isolated Execution Environments](https://awesome-repositories.com/f/development-tools-productivity/isolated-execution-environments.md) — Runs functions in isolated environments such as worker threads or containers to simulate runtime constraints. ([source](https://github.com/dherault/serverless-offline#readme))
- [Runtime Isolation Modes](https://awesome-repositories.com/f/development-tools-productivity/isolated-execution-environments/runtime-isolation-modes.md) — Runs functions in varying environments including worker threads, child processes, or containers to simulate runtime constraints.
- [Remote Layer Mounting](https://awesome-repositories.com/f/development-tools-productivity/layered-dependency-constraints/dependency-layering/remote-layer-mounting.md) — Downloads and mounts remote dependency layers into local containers to provide required libraries. ([source](https://github.com/dherault/serverless-offline#readme))
- [Virtual Dependency Layers](https://awesome-repositories.com/f/development-tools-productivity/layered-dependency-constraints/dependency-layering/virtual-dependency-layers.md) — Downloads remote library layers and mounts them into the local execution environment to provide required dependencies.
- [Layer Simulations](https://awesome-repositories.com/f/development-tools-productivity/local-development-environments/local-lambda-simulation/layer-simulations.md) — Emulates shared dependency layers by mapping host directories into the local runtime container. ([source](https://github.com/dherault/serverless-offline/blob/master/README.md))
- [Local Endpoint Invocations](https://awesome-repositories.com/f/development-tools-productivity/local-function-execution/local-endpoint-invocations.md) — Triggers local functions via endpoints using standard clients to test logic in isolation. ([source](https://github.com/dherault/serverless-offline#readme))

### Software Engineering & Architecture

- [Local Cloud Simulation](https://awesome-repositories.com/f/software-engineering-architecture/microservices-development/local-cluster-dependency-debugging/local-cloud-simulation.md) — Provides a comprehensive local simulation of serverless events, WebSocket connections, and SDK invocations.
- [Service Invocation Emulations](https://awesome-repositories.com/f/software-engineering-architecture/microservices-development/local-cluster-dependency-debugging/local-cloud-simulation/sdk-conformance-simulation/service-invocation-emulations.md) — Hosts a local HTTP server that emulates service invocation APIs to allow local functions to call each other. ([source](https://github.com/dherault/serverless-offline/blob/master/CLAUDE.md))
- [Time-Based Event Scheduling](https://awesome-repositories.com/f/software-engineering-architecture/time-based-event-scheduling.md) — Executes function handlers automatically based on time-based configurations defined in local service settings.

### Part of an Awesome List

- [Serverless Framework Plugins](https://awesome-repositories.com/f/awesome-lists/devtools/serverless-framework-plugins.md) — Acts as a plugin for the Serverless Framework to enable local cloud infrastructure emulation.

### DevOps & Infrastructure

- [API Gateway Simulators](https://awesome-repositories.com/f/devops-infrastructure/api-gateway-simulators.md) — Simulates an HTTP gateway locally to test request routing, CORS settings, and response mapping without a live provider.
- [Local SDK Invocation Simulation](https://awesome-repositories.com/f/devops-infrastructure/cloud-function-invocation-tools/local-sdk-invocation-simulation.md) — Creates local endpoints that mimic cloud APIs to trigger functions using a standard software development kit. ([source](https://github.com/dherault/serverless-offline/blob/master/README.md))
- [Local Serverless Testing](https://awesome-repositories.com/f/devops-infrastructure/cloud-infrastructure/cloud-computing-serverless/serverless-execution-environments/serverless-function-runtimes/local-serverless-testing.md) — Provides local runtime environments for testing serverless functions and their interactions.

### Networking & Communication

- [Bidirectional WebSocket Streaming](https://awesome-repositories.com/f/networking-communication/bidirectional-websocket-streaming.md) — Provides local endpoints for full-duplex communication channels by mimicking cloud WebSocket routes.
- [Websocket Connection Managers](https://awesome-repositories.com/f/networking-communication/connection-management/websocket-connection-managers.md) — Provides an API endpoint to manage persistent WebSocket connections and send messages back to connected clients. ([source](https://github.com/dherault/serverless-offline/blob/master/README.md))
- [Serverless WebSocket Emulations](https://awesome-repositories.com/f/networking-communication/serverless-websocket-emulations.md) — Simulates bidirectional WebSocket connections and message routing locally for real-time application development.
- [HTTP Request Routing](https://awesome-repositories.com/f/networking-communication/http-request-dispatching/http-request-routing.md) — Implements mechanisms for mapping HTTP paths to specific handler components locally. ([source](https://github.com/dherault/serverless-offline#readme))

### Web Development

- [WebSocket Communication](https://awesome-repositories.com/f/web-development/websocket-communication.md) — Supports bidirectional traffic by mimicking WebSocket routes and providing a mechanism to send messages back to clients. ([source](https://github.com/dherault/serverless-offline#readme))
- [Request and Response Transformers](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/request-and-response-transformers.md) — Provides functions that modify data payloads during the request and response lifecycle. ([source](https://github.com/dherault/serverless-offline#readme))
- [Path-Based Handler Routings](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/routing-request-handling/http-request-handlers/path-based-handler-routings.md) — Routes HTTP requests matching relative paths using proxy variables to a custom handler function. ([source](https://github.com/dherault/serverless-offline#readme))
- [Catch-All Path Captures](https://awesome-repositories.com/f/web-development/request-routing/path-prefix-matching/catch-all-path-captures.md) — Captures all remaining path segments after a fixed prefix to route multiple requests to a single function. ([source](https://github.com/dherault/serverless-offline/blob/master/README.md))

### Programming Languages & Runtimes

- [Multi-Language Runtime Support](https://awesome-repositories.com/f/programming-languages-runtimes/multi-language-runtime-support.md) — Supports multiple programming language runtimes through various isolation modes like child processes or containers. ([source](https://github.com/dherault/serverless-offline/blob/master/CLAUDE.md))

### Security & Cryptography

- [Access Policies](https://awesome-repositories.com/f/security-cryptography/access-policies.md) — Validates requests using custom or JWT authorizers to determine resource access permissions. ([source](https://github.com/dherault/serverless-offline/blob/master/CLAUDE.md))
- [Custom Authentication Providers](https://awesome-repositories.com/f/security-cryptography/custom-authentication-providers.md) — Integrates external authentication strategies via custom provider functions during local invocation. ([source](https://github.com/dherault/serverless-offline#readme))
- [Custom Authorization Logic](https://awesome-repositories.com/f/security-cryptography/identity-access-management/authentication-strategies/authorization-and-user-administration/access-control-authorization/custom-authorization-logic.md) — Emulates token, custom, and JWT authorizers to execute business-specific access validation logic. ([source](https://github.com/dherault/serverless-offline#readme))
- [Serverless Request Authorizers](https://awesome-repositories.com/f/security-cryptography/request-authorization-enforcers/serverless-request-authorizers.md) — Implements custom serverless logic to validate incoming API requests and mock authorizer responses. ([source](https://github.com/dherault/serverless-offline/blob/master/README.md))
- [Authorization Mocking](https://awesome-repositories.com/f/security-cryptography/user-identity-management/identity-header-injections/authorization-mocking.md) — Intercepts requests to validate tokens or JWTs using simulated identity injection for local access control testing.
