# @alex-way/adapter-lambda

> An adapter for [SvelteKit](https://kit.svelte.dev/) for AWS Lambda. [Serverless](https://serverless.com/) deployment.

Latest version **1.0.4** (published 2023-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @alex-way/adapter-lambda
pnpm add @alex-way/adapter-lambda
yarn add @alex-way/adapter-lambda
bun add @alex-way/adapter-lambda
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2023-02-03 |
| First published | 2022-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 13.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Alex Way |
| Maintainers | alex-way |
| Keywords | sveltekit, lambda, AWS, adapter, svelte |

## Links

- npm: https://www.npmjs.com/package/@alex-way/adapter-lambda
- Repository: https://github.com/alex-way/adapter-lambda
- Homepage: https://github.com/alex-way/adapter-lambda#readme
- Issues: https://github.com/alex-way/adapter-lambda/issues
- npm.io page: https://npm.io/package/@alex-way/adapter-lambda

## Dependencies (3)

- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [esbuild](https://npm.io/package/esbuild.md) 0.15.16
- [set-cookie-parser](https://npm.io/package/set-cookie-parser.md) ^2.5.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2023-02-03
- 1.0.1 (next) — 2023-01-02
- 1.0.3 — 2023-01-02
- 1.0.2 — 2023-01-02
- 1.0.0 — 2022-12-03
- 0.2.0 — 2022-12-03
- 0.1.0 — 2022-12-03

## README

# adapter-lambda for SvelteKit

An adapter to build a [SvelteKit](https://kit.svelte.dev/) app into a lambda ready for deployment via the Serverless framework, or any other framework (sst.dev, AWS SAM for example).

## Installation

```bash
# Install with npm
npm install --save-dev @alex-way/adapter-lambda

# Install with yarn
yarn add --dev @alex-way/adapter-lambda

# Install with pnpm
pnpm add --save-dev @alex-way/adapter-lambda
```

## Usage

In your `svelte.config.js` configure the adapter as bellow;

```js
import adapter from '@alex-way/adapter-lambda';

/** @type {import('@sveltejs/kit').Config} */
const config = {
  kit: {
    adapter: adapter(),
  },
};

export default config;
```

See `examples/serverless.yml` for an example of how to deploy the stack with the Serverless framework.

After building your app run `sls deploy` to deploy code to AWS using the build tool [serverless](https://www.serverless.com/).

Your app can then be accessed via the CloudFront distribution created as a part of the stack.

## Help! I'm getting an error while building or serving my app

As SvelteKit is still in early development, there are often breaking changes made to the adapter API and other associated functions. If this is the case, please raise an issue on [Github](https://github.com/alex-way/sveltekit-adapter-lambda/issues), and I will be happy to issue a fix.

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