CI CD is not the problem. The problem is amplify framework or Serverless framework. The serverless frameowork bundles all api into single lambda@edge and all SSR into single lambda@edge. When you import Amplify then it takes 1.5MB per api route or per SSR page. Lambda limit is 50 MB per lambda. So I am maxed out within 30 api routes or 30 SSR pages.
@naderdabit
3 жыл бұрын
Yes, we are definitely aware of and investigating how we can work with the maintainers of that package to fix the issue, as it's ultimately a problem with how the Serverless Next.js component handles dependencies of SSR & API routes. I'd also check out the info here around reducing bundle size: github.com/serverless-nextjs/serverless-next.js#the-lambdaedge-code-size-is-too-large
@ApoorvMote
3 жыл бұрын
@@naderdabit Thanks I already knew that. I finally learned docker and trying to run NextJS on fargate. Actually Lightsail now supports Containers too. So I may go that route for now.
@dotjs5025
Жыл бұрын
Very nice explanation . Thanks for this
@randomlife3050
3 жыл бұрын
Nader, any updates on AWS amplify hosting support for NextJS?
@naderdabit
3 жыл бұрын
Hey, yes it's still on the roadmap for first half of 2021.
@randomlife3050
3 жыл бұрын
@@naderdabit thank you Nader. Eagerly waiting. Is it possible to contribute though?
@dpklabs
3 жыл бұрын
Would you still recommend 'npx serverless' over amplify? Also, If I delete my api folder would 'npx serverless' not create the lambda for the api routes? Cheers!
@naderdabit
3 жыл бұрын
I only recommend using this if you're already using the Serverless framework or if you need SSR and API route support until Amplify supports it next year. Yes, if you remove the API folder no api routes should be created.
@dpklabs
3 жыл бұрын
@@naderdabit Thanks! I use the Serverless framework for many of my other projects. I started taking a deeper dive into Next.js the other day and was rebuilding a site using it which requires SSR currently. I'm looking forward to Amplify supporting this functionality
@rorycawley8334
3 жыл бұрын
I'd like to see GitHub actions with Amplify please
@vrrajshah
Жыл бұрын
I've been trying to figure this out for over a year now. It's not happening on my system, definitely not this easily🤧
Пікірлер: 12