article-bg

Deploying NextJS-SSR apps on AWS Amplify

React
Figma
article-image
5 minutes read

INTRODUCTION

Back in the day, vercel allowed hosting private github organization repos in their free plan, not anymore. They require you to subscribe to their paid plan which costs around $20/mo per seat whereas AWS amplify is free for first 12 months and after that you pay only for the bandwidth you use. They also do not charge anything per seat as vercel does. AWS amplify has its limitations when it comes to hosting a NextJS app. For example, they don't support on demand ISR, edge API routes, nextjs steaming and the new unstable_after hook that came in next 15.

Although these features are really important to have when it comes to apps like e-commerce etc but a point to consider aws is that vercel itself doesn't work properly with on-demand ISR, you can read more about it here.

IMPLEMENTATION

Configuring your NextJS app to build in standalone mode

If you want to host a nextjs app anywhere else than vercel, you need to make a small change in the next.config.js|mjs file, it's the output flag, after making the change, your next.config file should look something like this:

1

Related Articles