https://github.com/articulate/proxyl
AWS API Gateway Lambda Proxy service dev server
https://github.com/articulate/proxyl
aws aws-apigateway aws-lambda javascript nodejs
Last synced: 2 months ago
JSON representation
AWS API Gateway Lambda Proxy service dev server
- Host: GitHub
- URL: https://github.com/articulate/proxyl
- Owner: articulate
- License: mit
- Created: 2018-10-10T14:23:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-09T16:32:20.000Z (over 6 years ago)
- Last Synced: 2025-08-16T11:59:38.002Z (11 months ago)
- Topics: aws, aws-apigateway, aws-lambda, javascript, nodejs
- Language: JavaScript
- Homepage:
- Size: 54.7 KB
- Stars: 1
- Watchers: 56
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# proxyl
[](https://www.npmjs.com/package/proxyl)
[](https://www.npmjs.com/package/proxyl)
AWS API Gateway + Lambda proxy integration dev server.
Lifts your Lambda function into a web server that mimics the request/response format of an [API Gateway proxy integration](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html). Reloads on file changes with the power of [nodemon](https://nodemon.io/).
## Usage
```
Usage: proxyl [options] path/to/file.handlerName
Options:
-a, --auth path/to/authorizer.handlerName (default: "")
-p, --port Port to listen on (default: 3000)
-w, --watch Path(s) to watch, defaults to pwd (default: [])
-h, --help output usage information
```
The `path/to/file.handlerName` should be the same as the `handler` option specified for your Lambda function.
The `-a` option allows you to register a [Lambda authorizer](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html). To keep things simple, `proxyl`:
- Only supports `TOKEN` type authorizers, with the token in the `authorization` header.
- Will not cache the output of your authorizer.
- Will only `403` for a policy with `"Effect": "Deny"`, regardless of the `"Resource"`.
Any `"context"` included in the returned policy will be added to the request as [`event.requestContext.authorizer`](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format) to simulate how that works in a real API Gateway.
Feel free to watch multiple paths with multiple `-w` options, like this:
```
proxyl -w dist -w src src/index.handler
```