This tutorial provides detailed steps to deploy a Next.js App Router app on Amazon S3. It guides you through setting up an S3 bucket with CloudFront distribution, updating Next.js configuration for a static build, and creating necessary AWS resources like ACM certificates and Route 53 DNS settings. It also outlines a simple script to automate uploading static files to S3 and invalidating the CloudFront cache. The tutorial ensures your application is fully serverless, scalable, and cost-effective.
Table of contents
PrerequisitesUpdate the Next.js configurationCreate the infrastructureUpload the static files to S3ConclusionSort: