Thomas Desmond Headshot
Thomas Desmond
Cloudflare Technical Marketing Engineer

AWS Amplify Support for Next.js | Pages Architecture

Next.js Pages Architecture on Azure Static Web Apps

I have developed an application that focuses on isolating and testing the most essential features of Next.js. I deployed it to Amazon Web Services (AWS) Amplify to see how well it supported Next.js. The results are in, and I only had to take one point off from the results of Next.js on AWS Amplify.

Next.js Application Overview

The Next.js application I deployed is publicly available and open-source on GitHub at https://github.com/thomas-desmond/host-check-nextjs. (Leave it a star! 😃)

Essential factors of the app:

  • Next.js version 13.4.16
  • Pages-based Architecture

For more details on the app, check out my earlier article: Exploring Every Feature in Next.js and Testing Hosting Providers or YouTube Video: Using Every Next.js Feature to Test Hosting Providers (Part 1).

Deploying Next.js to AWS Amplify

I followed the Deploying a Next.js SSR app with Amplify documentation provided by AWS. I made no configuration changes, so it was an out-of-the-box deployment.

This means that my application is using the newer Amplify Hosting computer SSR provider, not the older Classic SSR.

AWS Amplify Support for Next.js

AWS Amplify supports every feature of Next.js that I tested. While all the features of Next.js worked on AWS Amplify, I was surprised by the slow performance of Incremental Static Regeneration (ISR).

Upon reaching the threshold for page revalidation time, rebuilding the pages would take more than a second. Over a second may not seem like a LONG time, but that does mean stale data is being served to users for longer. Other hosting providers like Vercel and Azure Static Web Apps performed the same page rebuild in under a second.

Note: See my full test of Azure Static Web Apps here:

Check out the table to see every feature tested and the results.

Next.js Feature Support
Next.js Version 13.4.16
✅
getStaticProps()
✅
getServerSideProps()
✅
Image Optimization
✅
Incremental Static Regeneration (ISR)
âš  (Poor Performance)
API Routes
✅
Middleware Redirects
✅
Edge Runtime
✅
Dynamic Routes
✅
next.config.js Redirects
✅
next.config.js Rewrites
✅
Sub-path Internationalization
✅
Sitecore JSS Image Optimization
✅

Want more details about the deployment of the Next.js app to AWS Amplify? Are you interested in seeing a more in-depth analysis of the supported features? Watch the video: