# next-aws-lambda

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

Latest version **2.5.1-alpha.0** (published 2020-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install next-aws-lambda
pnpm add next-aws-lambda
yarn add next-aws-lambda
bun add 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 | 2.5.1-alpha.0 |
| Published | 2020-06-24 |
| First published | 2019-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 26 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4458 |
| Author | Daniel Conde Marin |
| Maintainers | danielconde |
| Keywords | serverless, nextjs, lambda, next, api gateway |

## Links

- npm: https://www.npmjs.com/package/next-aws-lambda
- Repository: https://github.com/danielcondemarin/serverless-next.js
- Homepage: https://github.com/danielcondemarin/serverless-next.js#readme
- Issues: https://github.com/danielcondemarin/serverless-next.js/issues
- npm.io page: https://npm.io/package/next-aws-lambda

## Recent versions

- 2.5.1-alpha.0 (latest) — 2020-06-24
- 2.5.0 — 2020-06-16
- 2.5.0-alpha.0 — 2020-06-12
- 2.4.1 — 2020-05-06
- 2.4.0 — 2020-04-25
- 2.4.0-alpha.0 — 2020-04-23
- 2.3.8 — 2020-03-29
- 2.3.7 — 2020-03-29
- 2.3.6 — 2020-03-22
- 2.3.5 — 2020-02-29
- 2.3.4 — 2019-08-27
- 2.3.2 — 2019-08-14
- 2.0.5-alpha.0 — 2019-05-26
- 2.0.0-alpha.0 — 2019-05-15

## 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 next-aws-lambda`

## Usage

```js
const compat = require("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/next-aws-lambda · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
