@travetto/rest-aws-lambda
v5.0.17
Published
RESTful APIs entry point support for AWS Lambdas.
Downloads
112
Maintainers
Readme
RESTful AWS Lambda
RESTful APIs entry point support for AWS Lambdas.
Install: @travetto/rest-aws-lambda
npm install @travetto/rest-aws-lambda
# or
yarn add @travetto/rest-aws-lambda
The module provides support basic support with AWS lambdas. When using one of the specific rest modules (e.g. Express REST Source), you can install the appropriate lambda-related dependencies installed (e.g. aws-serverless-express) to enable integration with AWS. Nothing in the code needs to be modified to support the AWS integration, but there are some limitations of using AWS Lambdas as HTTP handlers.
CLI - Packaging Lambdas
Terminal: Invoking a Package Build
$ trv pack:lambda -h
Usage: pack:lambda [options]
Options:
-b, --build-dir <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/rest-aws-lambda/support/entry.handler")
--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")
--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
-h, --help display help for command