1# AWS Website: SvelteKit
2
3Deploys a SvelteKit app to AWS with `AWS.Website.SvelteKit` — no `svelte.config.js` adapter, no CDK.
4
5The resource builds the app with SvelteKit's own Vite pipeline and a wrangler-free in-memory AWS adapter, deploys the server output on a streaming Lambda Function URL, and serves client assets + prerendered pages from S3 behind CloudFront. Values passed via `env` are exposed to server routes through `process.env`.
6
7```ts
8const site = yield* AWS.Website.SvelteKit("SvelteKitSite", {
9 env: {
10 GREETING: "Hello from SvelteKit on AWS!",
11 },
12});
13```
14
15## Commands
16
17```sh
18bun alchemy deploy # build + deploy
19bun alchemy dev # SvelteKit's Vite dev server (Node SSR, HMR)
20bun alchemy destroy # tear down
21```
22
23## Notes
24
25- `@alchemy.run/frontend-frameworks` must be installed in the project — the server's source provider is loaded from its `/sveltekit` export at deploy time.
26- Unchanged projects skip the build and deploy entirely (the project tree is content-hashed, respecting `.gitignore`).
27- In `alchemy dev`, the site is kit's own Vite dev server (plain Node SSR) — already the AWS Lambda programming model, `process.env` included. No cloud resources are created; wrap the site in `Alchemy.remote()` to deploy the real infrastructure even during dev.