🧩 Next.js SSR on AWS Amplify: The Build-Time vs Runtime Env Trap
Why Next.js SSR Apps Break on AWS Amplify (and How to Fix Runtime Env Vars) When migrating a Next.js App Router + SSR app from Vercel to AWS Amplify, everything can look correct — builds succeed, environment variables are set, IAM permissions are configured — yet the app still crashes at runtime with 500 errors and “missing env vars”. I hit exactly this problem while migrating a production app using Cognito + API Gateway + Lambda + RDS. ...