Skip to content

Server-rendered apps

Next.js, Astro, SvelteKit, Nuxt and React Router apps that render on the server, on AWS Lambda.

Applies to EngineCloud
View as Markdown
On this page
  1. Frameworks
  2. How a request flows
  3. Limits that come from AWS

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

FrameworkAdapterNotes
Next.js 14 and newerOpenNext, maintained by RunApp 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 handlerserver islands and endpoints
SvelteKit@sveltejs/adapter-node in a Lambda handlerform actions and endpoints
Nuxt 3Nitro preset aws-lambda
React Router 7 / Remixthe 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

  1. CloudFront receives GET /pedidos/1042.
  2. The edge router finds which deploy the environment points to.
  3. A path under the static prefix (/_next/static/…, /_astro/…) is served from S3.
  4. Anything else goes to the deploy’s Lambda function, through a function URL only CloudFront can call.
  5. 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_instances keeps 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.

  1. Frameworks
  2. How a request flows
  3. Limits that come from AWS

    Search pages, sections and terms