| 1 | # AWS Website: Waku |
| 2 | |
| 3 | Deploys a [Waku](https://waku.gg) app to AWS with `AWS.Website.Waku` — no `waku.config.ts` adapter, no CDK. |
| 4 | |
| 5 | The resource builds the app with waku's own Vite pipeline and a wrangler-free in-memory AWS adapter: the RSC server bundle deploys on a streaming Lambda Function URL, and the client output (including SSG-prerendered pages and the RSC payloads) deploys to S3 behind CloudFront. Values passed via `env` are readable in server components through waku's `getEnv`. |
| 6 | |
| 7 | ```ts |
| 8 | const site = yield* AWS.Website.Waku("WakuSite", { |
| 9 | forceDestroy: true, |
| 10 | env: { |
| 11 | GREETING: "Hello from Waku on AWS!", |
| 12 | }, |
| 13 | }); |
| 14 | ``` |
| 15 | |
| 16 | ## Commands |
| 17 | |
| 18 | ```sh |
| 19 | bun alchemy deploy # build + deploy |
| 20 | bun alchemy dev # waku's Vite dev server (HMR) |
| 21 | bun alchemy destroy # tear down |
| 22 | ``` |
| 23 | |
| 24 | ## Notes |
| 25 | |
| 26 | - `@alchemy.run/frontend-frameworks` must be installed in the project — the server's source provider is loaded from its `/waku` export at deploy time. |
| 27 | - Unchanged projects skip the build and deploy entirely (the project tree is content-hashed, respecting `.gitignore`). |
| 28 | - Read env via `getEnv` from `waku` (as in `src/pages/index.tsx`) — it is backed by the Lambda's `process.env` at request time and keeps page modules portable across deploy targets. |