TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Help with NextJS deployment architecture on AWS

3 pointsby fazkan9 months ago
I use pm2, with nginx in front, on a lightsail instance (ubuntu base-image) and manually run commands (clone, migrate, and pm2 restart) every time we merge to a prod branch, with the idea that eventually those commands will run as part of github actions.<p>The postgres is also on the same instance.<p>Curious if anyone has any comments on this.<p>Also a side question if anyone has used coolify for production apps? How was the experience?<p>I don&#x27;t want to spend more time than is required maintaining the infra for the webapp.<p>Can&#x27;t go with vercel or a hosted PAAS, because we have AWS credits, and don&#x27;t want to spend unnecessarily.<p>thanks in advance

5 comments

qbxk9 months ago
my 2c is package it as a Dockerfile and push it to ECR and set up an ECS fargate stack to run it. It&#x27;s a little work to understand what this entails, but it will pay off, is cheap to run, and you can use it for everything.<p>Don&#x27;t host your own db, use a t3.micro from RDS for postgres (NOT aurora). If you don&#x27;t want to use RDS use an EC2 instead. Definitely don&#x27;t containerize the db.<p>You&#x27;ll also need an ALB to put in front of your ECS cluster, but you can use the same ALB for as many clusters or apps as you want<p>This will probably cost you $20-30&#x2F;mo before bandwidth charges and will carry a lot of traffic, but if you need more you just increment how many nodes you&#x27;re running, no sweat<p>Probably learn how to do this using the console, but you do this all with terraform and you can just rubber stamp your application infra like magic
评论 #41206080 未加载
flybayer9 months ago
Hi, you might like <a href="https:&#x2F;&#x2F;www.flightcontrol.dev">https:&#x2F;&#x2F;www.flightcontrol.dev</a> which fully automates production infra in your AWS. So you get to use your AWS credits, and you can even pay Flightcontrol with your credits, so it&#x27;ll be 100% free.<p>Flightcontrol is very popular for Next.js deployments on AWS<p>*I&#x27;m cofounder of Flightcontrol
评论 #41195938 未加载
solardev9 months ago
Can you just deploy to AWS Amplify? It&#x27;s a higher level of abstraction. <a href="https:&#x2F;&#x2F;docs.aws.amazon.com&#x2F;amplify&#x2F;latest&#x2F;userguide&#x2F;deploy-nextjs-app.html" rel="nofollow">https:&#x2F;&#x2F;docs.aws.amazon.com&#x2F;amplify&#x2F;latest&#x2F;userguide&#x2F;deploy-...</a>
评论 #41206095 未加载
detuks9 months ago
<a href="https:&#x2F;&#x2F;docs.sst.dev&#x2F;start&#x2F;nextjs">https:&#x2F;&#x2F;docs.sst.dev&#x2F;start&#x2F;nextjs</a> I use this for few projects
8b16380d9 months ago
CloudFront distribution backed with Appsync or API Gateway?
评论 #41206085 未加载