How can I deploy a Next.js 15 web app on AWS Lambda.
Unanswered
Schneider’s Smooth-fronted Caima… posted this in #help-forum
Schneider’s Smooth-fronted CaimanOP
I am looking to deploy a Next.js 15 web application on AWS Lambda but want to avoid using any third-party libraries or frameworks like SST.
The goal is to manually define a lambda_handler function that takes path and headers and returns the webpage.
What are the necessary steps for bundling the Next.js app, configuring AWS Lambda functions, setting up API Gateway for routing, and handling static assets.
Additionally, I want to ensure optimal performance and compatibility with Next.js features like API routes and server-side rendering.
Any guidance or best practices for this setup would be appreciated.
The goal is to manually define a lambda_handler function that takes path and headers and returns the webpage.
What are the necessary steps for bundling the Next.js app, configuring AWS Lambda functions, setting up API Gateway for routing, and handling static assets.
Additionally, I want to ensure optimal performance and compatibility with Next.js features like API routes and server-side rendering.
Any guidance or best practices for this setup would be appreciated.
1 Reply
@Schneider’s Smooth-fronted Caiman I am looking to deploy a Next.js 15 web application on AWS Lambda but want to avoid using any third-party libraries or frameworks like SST.
The goal is to manually define a lambda_handler function that takes path and headers and returns the webpage.
What are the necessary steps for bundling the Next.js app, configuring AWS Lambda functions, setting up API Gateway for routing, and handling static assets.
Additionally, I want to ensure optimal performance and compatibility with Next.js features like API routes and server-side rendering.
Any guidance or best practices for this setup would be appreciated.
Korat
Hi, it's not that simple. Just look how complicated SST code is. You need to add custom code on top of vercel build to act as vercel infra.
Vercel build: https://vercel.com/docs/cli/build
Vercel build: https://vercel.com/docs/cli/build