# @dolsze/next-aws-lambda

> Compat layer between next.js serverless page and AWS Lambda

Latest version **4.1.0** (published 2023-08-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dolsze/next-aws-lambda
pnpm add @dolsze/next-aws-lambda
yarn add @dolsze/next-aws-lambda
bun add @dolsze/next-aws-lambda
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.1.0 |
| Published | 2023-08-04 |
| First published | 2023-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 23.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel Conde Marin |
| Maintainers | nike1v |
| Keywords | serverless, nextjs, lambda, next, api gateway |

## Links

- npm: https://www.npmjs.com/package/@dolsze/next-aws-lambda
- Repository: https://github.com/nike1v/serverless-next13
- Homepage: https://github.com/nike1v/serverless-next13#readme
- Issues: https://github.com/nike1v/serverless-next13/issues
- npm.io page: https://npm.io/package/@dolsze/next-aws-lambda

## Recent versions

- 4.1.0 (latest) — 2023-08-04
- 1.2.3 — 2023-08-04
- 1.1.11 — 2023-08-03
- 1.1.6 — 2023-08-03
- 1.0.9 — 2023-08-02

## README

# API Gateway Lambda Compat

Compat layer between next.js serverless page and API Gateway => Lambda Proxy Integration.

Lambda Proxy Integration event structure documentation can be found [here](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html).

## Installation

`npm install @dolsze/next-aws-lambda`

## Usage

```js
const compat = require("@dolsze/next-aws-lambda");
const page = require(".next/serverless/pages/somePage.js");

// using callback

module.exports.render = (event, context, callback) => {
  compat(page)(event, context, callback);
};

// using async promise

module.exports.render = async (event, context) => {
  const responsePromise = compat(page)(event, context); // don't pass the callback parameter
  return responsePromise;
};
```

---
_Source: https://npm.io/package/@dolsze/next-aws-lambda · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
