When Next.js 13 introduced the App Router in 2022, it was a preview of a new way to build React applications. Several releases later, that model is the default. If you built on Next.js a few years ago, or are choosing a framework today, here is what changed and how to run it well on AWS.
The App Router is now the standard
The app/ directory became stable in Next.js 13.4 and is now the recommended way to build. Routes are folders, and each route can have its own layout, loading state and error page. Layouts are shared and persist between pages, so navigation feels faster and code is less repetitive.
The older pages/ directory still works, so existing projects can move route by route rather than in one big rewrite.
Server Components by default
In the App Router, components run on the server unless you mark them with "use client". That means less JavaScript sent to the browser, direct access to databases and APIs from the server, and secrets that never reach the client. Interactive parts, such as forms, menus and charts, become small client components.
Practical rule: keep pages and data fetching on the server, and push "use client" as far down the component tree as you can.
Server Actions for forms and mutations
Server Actions let a form or button call a server function directly, without writing a separate API route. They became stable in Next.js 14 and simplify most create, update and delete flows. Treat them like any public endpoint: validate input and check permissions inside every action.
Caching became explicit
Early App Router versions cached aggressively by default, which surprised many teams. From Next.js 15, data fetches are no longer cached unless you ask for it. The lesson for production: decide per page whether content is static, revalidated on a schedule, or fully dynamic, and make that choice visible in the code.
Turbopack for faster development
Turbopack, the Rust-based bundler first previewed in Next.js 13, is now stable for local development and makes start-up and hot reload noticeably faster on large projects.
Hosting Next.js on AWS
Next.js does not need a specific host. On AWS, three options cover most projects:
- AWS Amplify Hosting: the quickest path. Connect your Git repository and Amplify builds and serves the app, including server-side rendering. Good for marketing sites and most SaaS front ends.
- Containers on Amazon ECS with AWS Fargate: run Next.js as a Node.js container behind a load balancer and Amazon CloudFront. Best when you need full control, private networking to databases, or steady high traffic.
- Serverless with OpenNext: the open-source OpenNext project packages Next.js for AWS Lambda and CloudFront. Cost-efficient for spiky traffic, with more moving parts to manage.
Whichever you choose, put CloudFront in front for caching and TLS, keep secrets in AWS Secrets Manager or Parameter Store, and deploy through a pipeline rather than by hand.
Upgrading an older Next.js app
- Upgrade Next.js and React on the
pages/router first, and fix warnings. - Move one low-risk route to
app/to learn the patterns. - Migrate the remaining routes in batches, reviewing caching for each one.
- Load-test before switching production traffic.
Need help moving a Next.js application to AWS or modernising an older one? Talk to our team. For domains, hosting and smaller websites, our division NodeMonster can help.