close

AWS Lambda

Use Nitro's aws-lambda preset to build a Lambda-compatible server bundle. The Lambda filesystem is temporary, so store application data in a persistent SQL provider.

vite.config.ts
export default defineConfig({
  plugins: [agentNative({ nitro: { preset: "aws-lambda" } })],
});

Build the function bundle:

npx @agent-native/core@latest build

Publish the generated output with AWS SAM, CDK, Serverless Framework, or the AWS console. Configure DATABASE_URL, BETTER_AUTH_SECRET, and any app secrets in Lambda environment variables or AWS Secrets Manager.

See Nitro's AWS Lambda provider guide for provider-specific packaging and streaming options.

What's next