Coder Social home page Coder Social logo

Comments (7)

ofhouse avatar ofhouse commented on July 20, 2024 3

Hi, thanks for your kind words, appreciate it πŸ‘

I do not have that much time to explain it in detail now, but I published some insights in this article: Why we self-host our serverless Next.js site on AWS with Terraform.

from terraform-aws-next-js.

ofhouse avatar ofhouse commented on July 20, 2024 3

Hard to say, my prediction is that it will become a little easier to maintain Next.js on AWS Lambda since Vercel decided to drop the build target completely.
That means a custom server and a serverless environment on Vercel both using the same build output (.next/server) from now on (#86).
However a preparation step is still needed to make it runnable on AWS Lambda.

In other conversations I gathered that Vercel now moved their build pipeline to closed source (I understand given their venture-funded commitments.). In response, both you and blitz.js have forked the current pipeline.

Some correction here, Blitz.js has forked the Next.js project (blitz-js/blitz#1990) itself, not the pipeline.
We forked the pipeline (#36) that Vercel was / is using to customize the build output from .next/server to make it runnable inside AWS Lambda.

In general I think the task of keeping feature parity with Vercel will become more difficult since Vercel can always introduce changes to Next.js codebase that break something of our build pipeline (For example: milliHQ/terraform-aws-next-js-image-optimization#19).
This is the downside of the concept. Vercel publishes much of their software as open source, but the development and roadmap stays mostly private.
On the other side they always have to release new features that are exclusive to Vercel to stay relevant, since Netlify also works on a serverless implementation and AWS Amplify also works on serverless support for Next.js behind the scenes.

Vercel also has the advantage that they have full control over the CDN / Router, since they are operating their own network (think they were using CloudFlare before for this task), while we are currently bound to CloudFront. It can handle most of it with the help Lambda@Edge too but is lacking a lot of features compared to their CDN, since AWS has only recently begun to dedicate more resources to CloudFront development.

What makes it so difficult is that Vercel cannot support this kind of projects because they would kill their own business model if they would do this. Competition in this field is currently really hard and everyone could recently see that AWS is eating up a lot of space in the SAAS economy (MongoDB, elasticsearch).
Currently they give Serverless Framework a hard time with Amplify & CDK and I guess they will not stop there.

from terraform-aws-next-js.

vha14 avatar vha14 commented on July 20, 2024

The blog post you shared is really fantastic - thanks again @ofhouse !!

In other conversations I gathered that Vercel now moved their build pipeline to closed source (I understand given their venture-funded commitments.). In response, both you and blitz.js have forked the current pipeline.

Do you anticipate big challenges in maintaining these forks while aiming for feature parity with Vercel?

from terraform-aws-next-js.

vha14 avatar vha14 commented on July 20, 2024

This is very helpful, thanks for taking the time to explain.

from terraform-aws-next-js.

tlinhart avatar tlinhart commented on July 20, 2024

@vha14 I'm also interested in getting this to work with Pulumi as that's what we are using for the rest of infrastructure. Have you been successful with that?

from terraform-aws-next-js.

vha14 avatar vha14 commented on July 20, 2024

from terraform-aws-next-js.

ofhouse avatar ofhouse commented on July 20, 2024

I'm going to close this issue because it has been inactive for 30 days ⏳. This helps to find and focus on the active issues.

from terraform-aws-next-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.