🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

aws-lambda-rie-http

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-lambda-rie-http

Simulate HTTP requests to your Lambda function handlers

1.1.0
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

aws-lambda-rie-http

NPM Tests

A Lambda Runtime Interface Emulator simulating a HTTP server.

$ npm install --save-dev aws-lambda-rie-http
$ npx aws-lambda-rie-http app.handler
app.handler listening on 127.0.0.1:3000

Usage

# path/to/your.js
#   `module.exports.handler = function handler(event, context) { ... }`
#   `export function handler(event, context) { ... }`
$ npx aws-lambda-rie-http path/to/your.handler
path/to/your.handler listening on 127.0.0.1:3000

Options

aws-lambda-rie-http <lambda.handler> [options]

Options:
  --help                             Show help                         [boolean]
  --version                          Show version number               [boolean]
  --host                             HTTP server host to bind to
                                                 [string] [default: "127.0.0.1"]
  --port                             HTTP server port   [number] [default: 3000]
  --event-format, --eventFormat
                                     [string] [choices: "LAMBDA_FUNCTION_EVENT",
                   "API_GATEWAY_PROXY_EVENT_1.0", "API_GATEWAY_PROXY_EVENT_2.0"]
                                              [default: "LAMBDA_FUNCTION_EVENT"]
  --context-format, --contextFormat
                [string] [choices: "LAMBDA_CONTEXT"] [default: "LAMBDA_CONTEXT"]

Typescript

# path/to/your.ts
#   `export function handler(event: ..., context: ...): Promise<...> { ... }`
$ npx ts-node ./node_modules/.bin/aws-lambda-rie-http path/to/your.handler
path/to/your.handler listening on 127.0.0.1:3000

Notes

Any questions or suggestions please open an issue.

FAQs

Package last updated on 19 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts