Skip to content

[aws]: add aws-lambda-compressed #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pages/aws/config/overrides/wrapper.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ The `aws-lambda-streaming` Wrapper is a wrapper that allows you to use streaming
- [x] Streaming
- [x] Proper support for `waitUntil`

### aws-lambda-compressed

The `aws-lambda-compressed` Wrapper is a wrapper that will compress the response body by default. Compression will be applied in the following priority order: `br` (Brotli) → `gzip` → `deflate`.
If none of these is found, we just return the body as is. The compression quality for brotli can be configured using the `BROTLI_QUALITY` environment variable. If not set, it defaults to 6.

#### Features

- [x] Compression
- [ ] Streaming
- [ ] Proper support for `waitUntil`

### cloudflare-edge

The `cloudflare-edge` Wrapper is the wrapper for Cloudflare Workers. It should be used for the external middleware and for the `edge` runtime of Next.
Expand Down
2 changes: 1 addition & 1 deletion pages/aws/config/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Each server config will be under it's own key in the config object. Here are all
This is the entrypoint of the server.
Be aware that it might not be enough to change this to make it work on said platform. This is only the entrypoint, you might need to change other parts of the server to make it work on the platform.

Possible values are: `aws-lambda`, `aws-lambda-streaming`, `cloudflare-edge`, `cloudflare-node`, `node`, `express-dev`, `dummy` or a `LazyLoadedOverride` that will return the wrapper.
Possible values are: `aws-lambda`, `aws-lambda-streaming`, `aws-lambda-compressed`, `cloudflare-edge`, `cloudflare-node`, `node`, `express-dev`, `dummy` or a `LazyLoadedOverride` that will return the wrapper.

#### [`converter`](overrides/converter)

Expand Down
1 change: 1 addition & 0 deletions pages/aws/inner_workings/components/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Here is a list of the provided wrappers:

- `aws-lambda` - The default AWS Lambda wrapper - It is the default wrapper
- `aws-lambda-streaming` - The AWS Lambda wrapper with streaming support
- `aws-lambda-compressed` - The AWS Lambda wrapper with compression on the response body by default
- `node` - The Node wrapper - Create a node server, not suitable for serverless
- `cloudflare` - The Cloudflare wrapper - For Cloudflare Worker

Expand Down