@travetto/web-aws-lambda
v8.0.3
Published
Web APIs entry point support for AWS Lambdas.
Maintainers
Readme
Web AWS Lambda
Web APIs entry point support for AWS Lambdas.
Install: @travetto/web-aws-lambda
npm install @travetto/web-aws-lambda
# or
yarn add @travetto/web-aws-lambdaThis module provides an adapter between Web API and AWS Lambda. The event-driven invocation model for Web API aligns cleanly with AWS Lambda's model for event-driven operation.
NOTE: The only caveat to consider, is that while the framework supports streams for responses, AWS Lambda does not. Any streaming result will be read and converted into a Buffer before being sent back.
CLI - pack:lambda
Use this command to produce the Lambda-ready archive for deployment.
Terminal: Help for pack:lambda
$ trv pack:lambda --help
Usage: pack:lambda [options] [args...:string]
Description:
Build an AWS Lambda-ready zip package using the pack pipeline.
Configures the Lambda entrypoint and emits a compressed deployment artifact
suitable for direct Lambda upload workflows.
Options:
-b, --buildDir <string> Workspace for building (default: "/tmp/<temp-folder>")
--clean, --no-clean Clean workspace (default: true)
-o, --output <string> Output location (default: "<module>.zip")
-es, --main-scripts Create entry scripts (default: false)
-f, --main-name <string> Main name for build artifact
-e, --entry-point <string> Entry point (default: "@travetto/web-aws-lambda/support/entry.handler.ts")
--minify, --no-minify Minify output (default: true)
-sm, --sourcemap Bundle source maps (default: false)
-is, --include-sources Include source with source maps (default: false)
-x, --eject-file <string> Eject commands to file
-r, --rollup-configuration <string> Rollup configuration file (default: "@travetto/pack/support/rollup/build.ts")
--env-file <string> Env Flag File Name (default: ".env")
--manifest-file <string> Manifest File Name (default: "manifest.json")
-wr, --include-workspace-resources Include workspace resources (default: false)
-np, --npm-package <string> External NPM Packages (default: [])
-m, --module <module> Module to run for
--help display help for command
Examples: