Server-rendered apps
Next.js, Astro, SvelteKit, Nuxt and React Router apps that render on the server, on AWS Lambda.
A server-rendered app has two halves: files that never change between requests, and code that renders a page per request. Run splits them: the files go to S3 behind CloudFront, the server code becomes an AWS Lambda function that CloudFront calls for dynamic paths.
Frameworks
| Framework | Adapter | Notes |
|---|---|---|
| Next.js 14 and newer | OpenNext, maintained by Run | App Router and Pages Router, middleware at the edge, image optimization, incremental static regeneration with on-demand revalidation |
Astro with output: 'server' | @astrojs/node in a Lambda handler | server islands and endpoints |
| SvelteKit | @sveltejs/adapter-node in a Lambda handler | form actions and endpoints |
| Nuxt 3 | Nitro preset aws-lambda | |
| React Router 7 / Remix | the Node adapter in a Lambda handler |
Run pins the adapter version per deploy, so rebuilding an old commit gives the same result.
How a request flows
- CloudFront receives
GET /pedidos/1042. - The edge router finds which deploy the environment points to.
- A path under the static prefix (
/_next/static/…,/_astro/…) is served from S3. - Anything else goes to the deploy’s Lambda function, through a function URL only CloudFront can call.
- The response is cached when it says so (
Cache-Control), per deploy.
Limits that come from AWS
- A request can last up to the function’s timeout; Run sets 30 seconds by default, and AWS allows at most 15 minutes behind a function URL with response streaming.
- A response body is limited by Lambda’s payload size unless the framework streams it.
- The first request after a quiet period starts a new instance (a cold start, usually under a second for Node).
min_instanceskeeps instances warm in Sypnia Cloud, metered as idle time.
When these do not fit (WebSockets, very long requests, large memory), deploy the app as a container.