amplify vs ec2 for nextjs 15 on aws

So im looking for to deploy my nextjs app, the main reason for not choosing vercel cuz they dont allow private repos to deploy when they have contributors other than the owners pushing to production, and you have to pay $20 a month to have that functionality
So im looking at AWs as an option to deploy nextjs app that uses postgres db, but im a bit confused as to how to choose between ec2 and amplify
I do understand the basic difference as one is a vps and amplify is a more of a backend as a service Since I’ve never used the aws ecosystem, can someone explain what the advantages while choosing one over the other in terms of like usage, billing and ease of deploying db and app and developer experience

Personally, I’m not a fan of amplify. Id go the other way. But that’s just personal preference. Both should work, one is just less flexible.

Avoid Amplify.

I agree that you lose flexibility with amplify

ease of deployment is a definitely a plus of amplify. just connect your repo and it’ll deploy on push to main branch

Amplify is your best bet here. Way less headache with deployment and scaling. Plus, it’s cheaper to start with since you’re not paying for idle EC2 time.

Just remember Amplify has some limitations with custom server-side configs.

The main issue is the db. If you use amplify, you don’t get a virtual server or instance, where you could host your db as well. It’s a serverless hosting platform, which you pay per usage. So if there are no requests, you pay almost nothing. Amplify offers a complete CI CD pipeline and also lets you integrate with cognito authentication and the dynamodb/graphql persistence services among others. If you want to use postgres, you would need to deploy your db separately, e.g. as AWS RDS or Aurora for a serverless db (which is not what you want for cheap deployment) and then there is still the question of integration. On the upside, amplify hosted apps scale automatically. So you never ever have to think about scaling up your servers. You get billed accordingly though :D. So if you want to keep using postgres, you are probably better of using EC2, but then you are in a non-serverless dogma again, where you have to scale up your instance types / amount of instances depending on your usage and so on, and also pay for idle capacity.

open next and use a cdk construct

https://opennext.js.org/

Honestly, while I love AWS, Cloudflare Pages has been my go to for NextJS hosting. It’s 100% free, automatic CI/CD integration with GitHub and other VCS providers, and allows you to connect to private repos. That being said, I’m not doing anything that requires a database, just static site exports using NextJS

If you want to stay on AWS, I recommend avoiding both and going with ECS Fargate, deploying your site/app as a container

Eh, those $20 don’t sound so bad… If you want to use something fancier, it’ll cost you around that much or more, with the additional work of doing all the difficult configuration things.

Idk about amplify… But usually you are better off avoiding PaaS platforms because they put harsh limitations when you try to step outside of your app’s runtime. So, I would just say… If you want simplicity then go with the vender that is all-in on your platform. In this case Vercel.

Amplify is very affordable and a nice serverless stack to work with. Been using for 3 years and am very happy. Just migrated to Next.js 15 app router. Works like a charm. Fast and affordable.

Dont use Amplify…

Yes don’t use vercel, you will have much more control

I’d highly recommend to AVOID amplify stack except for hosting the frontend part. Hosting part is just a wrapper around S3 and Cloudfront (but without being able to manage Cloudfront distribution).
I have an SPA Vue app, and hosting is ok. For my clients using my stack: https://saasconstruct.com/, hosting is ok. Everything else is cdk based, not amplify.

You can check, I even wrote a list of problems with Amplify I encountered (go to Amplify section of the blog): https://saasconstruct.com/blog/the-tech-stack-of-a-simple-saas-for-aws-cloud

Thats $20 per user, No way in hell Im paying $20 just to be able to deploy in someone else’s account and repo, and with me having to host database somewhere else

well then just deploy to EC2, goodluck

have you managed to deploy API Endpoints (App router for frontend pages, and Pages router for endpoints)

Hi, did you make a decision on this? We built a prototype app in Vercel using Amplify to host, and now were at 100+ users its very flaky, looking to migrate to EC2 but not sure it’s going to be that simple because of how black box amplify is, a straightforward migration didn’t deploy properly on first attempt

We did it on EC2, but honestly as of right now, we’re obv not expecting a million or even a hundred thousand concurrent users, hence I am considering hosting on a VPS