sveltekit-adapter-middy
v0.1.0
Published
SvelteKit adapter for AWS Lambda with Middy
Maintainers
Readme
Creates a lambda that supports a Function URL with streaming responses.
Features
- Response Stream
- Extendable with Middy middlewares:
http-content-encodinghttp-security-headersssm/secrets-manger
- Removes
x-sveltekit-pageheaders - Multiple
Set-Cookies - Override
Originheader withORIGINenv
Note: Bring your own deployment.
Getting started
npm i -D sveltekit-adapter-middyimport adapter from 'sveltekit-adapter-middy'
export default {
kit: {
adapter: adapter({
// options
})
}
}Options
handlerPath(string): Relative path to handler override file. Overriding allows you to add in Content-Encoding, Security Headers, and pass in secrets more securely. Defaults to build-in minimalist handler.out(string): Relative path to build dir. Defaults tobuildesbuildOptions(object):esbuildoption overrides. See code for defaults.
Recommended Infrastructure
- CloudFront: Route to static assets / pages, with fallback to server side rendering
- S3: store static assets and pages
- Lambda Function URL: server side rendering
Roadmap
- infra diagram
- cli to sync static assets to S3 w/ headers
- LLRT
License
Licensed under MIT License. Copyright (c) 2017-2026 will Farrell and the sveltekit-adapter-middy contributors.
