How to host Next.js on AWS Serverless Architecture?

⚛️ Learn Full Stack Development on codedamn: cdm.sh/fullstack
👉 Free NextS Course: cdm.sh/nextjsbasicscourse
Should You Learn AWS?: • Should You Learn AWS a...
Bye Vercel. Hello AWS!: • Bye Vercel. Hello AWS!
AWS Killed Codedamn: Bye AWS, Hello Vercel: • AWS Killed Codedamn: B...
Timestamps
0:00 Teaser
0:19 Video Starts
1:07 How Next.JS Build work on Server less Environment?
6:48 Server-less Next.js Function
7:38 Problem with Lambda@Edge
9:45 Production Deployment of Codedamn
12:28 Conclusion
13:29 Outro
👉 Free HTML5 + CSS3 Course: cdm.sh/htmlcsscourse
👉 Free JavaScript Course: cdm.sh/jsbasicscourse
👉 Free ReactJS Course: cdm.sh/react
💰 Refer codedamn to friends and earn $$: cdm.sh/refer
👉 Checkout codedamn on social:
Instagram: cdm.sh/ig
Twitter: cdm.sh/twt
Facebook: cdm.sh/fb
GitHub: cdm.sh/github
If you found the video valuable, please leave a like and subscribe ❤️ It helps the channel grow and helps me pumping out more such content.
👋 About Me:
Hey! I'm Mehul Mohan, a CSE'21 graduate from BITS Pilani, Goa. I started coding early in life, at the age of 13 when I created my first blog on Blogger. I am listed in Google, Microsoft, Sony, eSet, etc. Hall of Fame for reporting vulnerabilities in their systems.
🍎 I am Apple's WWDC'19 Scholar - visited San Francisco and attended WWDC.
📙 I am an author of 2 books, on JavaScript and React - cdm.sh/mehulbooks
🚀 Currently working on my own startup - codedamn.
Connect with me:
📸 Instagram: cdm.sh/mehulig
📱 Twitter: cdm.sh/mehultwitter
📝 LinkedIn: cdm.sh/mehullinkedin
📂 GitHub: cdm.sh/mehulgithub
🌎 Personal website: cdm.sh/mehulblog
💻 Start learning to code for free: cdm.sh/codedamn
🧑‍🤝‍🧑 Discord community: cdm.sh/discord
👉 HTML5 + CSS3 Tutorials: cdm.sh/htmlcssytplaylist
👉 Complete JavaScript Tutorial: cdm.sh/jstutorial
👉 Complete React Crash Course: cdm.sh/reacttutorial
👉 Next JS Tutorials: cdm.sh/nextjsytplaylist
🏷 Video Tags:
NEXT JS Serverless Infrastructure on AWS Explained!
serverless nextjs
learn next.js
next.js full course beginners
next js tutorial
next.js tutorial for beginners
next js 12
Vercel
website hosting
how to host a website for free
free web hosting
host your website for free
amazon web services
aws cloudfront
aws lambda
👉 Check out my other personal KZread channel (it is in Hindi/English mix) where I share coding tips, tricks, and hacks: cdm.sh/mehulyt

Пікірлер: 35

  • @sanjay_3129
    @sanjay_31292 жыл бұрын

    Thanks for lot of information u r giving... It is a great help for us to learn every corners of the technology

  • @sachiechan
    @sachiechan Жыл бұрын

    Thanks for explaining. Awesome video

  • @subhamjaguri9019
    @subhamjaguri90192 жыл бұрын

    Whenever I am struggling with something your video pops up. Thank you so much Mehul. Learning lot of things from you. Can you please make a video on how to host Express app on Lambda with MongoDB?

  • @patrickwerz4608
    @patrickwerz46082 жыл бұрын

    Hi Mehul, great video! Why is lambda @edge sending an event to sqs to inform a lambda to rebuild a site? If ttl of a page is 15 couldn’t you just cron the lambda every 15 min to rebuild and update s3? Just wondering about the architecture of the rebuild trigger. Thanks, Patrick

  • @yadneshkhode3091
    @yadneshkhode30912 жыл бұрын

    please keep making videos related to architectures and backend and system design and aws

  • @iukeay
    @iukeay2 жыл бұрын

    Do you happen to know if when using AWS amplify that it is the same process where the Lambda at edge goes to the origin and then calls a basic lambda function?

  • @okredo1
    @okredo12 жыл бұрын

    great point re decoupling the lambda@edge... the 1Mb limit particularly hard to overcome; curious if you had to work around that or just avoided by measurement?

  • @saurabhshukla2605
    @saurabhshukla26052 жыл бұрын

    Awesome explanation.

  • @iukeay
    @iukeay2 жыл бұрын

    Did a better job explaining how NextJS works on AWS than AWS does :D

  • @karthikkhoday5555
    @karthikkhoday55554 ай бұрын

    How database works, is it located at one location, or has replicas at multiple locations for faster response

  • @rafaelmarques1773
    @rafaelmarques17732 жыл бұрын

    I find it the most fascinating, however, I have yet to see a single example of this Lambda Edge triggering another instance of an ISR build page on the web, it seems almost magical to me at this point. Have you considered creating a simple example for us out there? It shouldn't take long, it's just config in the end, but it's really tricky I to know what you don't know I guess. Edit: without the serverless framework that is haha

  • @rajarshibarman4474
    @rajarshibarman44742 жыл бұрын

    youre killing it with those wojack thumbnails

  • @ognitiotechnologies6326
    @ognitiotechnologies63262 жыл бұрын

    any codebased examples available in your channel

  • @user-sq3ty2he6
    @user-sq3ty2he6 Жыл бұрын

    why are you not using aws amplify for this

  • @sadiqabubakar7189
    @sadiqabubakar71892 жыл бұрын

    I watched till the end

  • @AkashSingh-uk5ub
    @AkashSingh-uk5ub2 жыл бұрын

    Nice explanation.Also,Mongodb Atlas now got a REST Api for CRUD operations.Please make a video on that

  • @nooobcoder

    @nooobcoder

    2 жыл бұрын

    Wow, thanks for this update, I did not know recently abt this. Seems like they are going the same way as Supabase's PostgREST strategy.

  • @AkashSingh-uk5ub

    @AkashSingh-uk5ub

    2 жыл бұрын

    @@nooobcoder Yeah,seems same to me also

  • @mr.random8447
    @mr.random8447 Жыл бұрын

    What about AWS Amplify?

  • @lardosian
    @lardosian2 жыл бұрын

    How long did it take you to figure this out and port everything over to AWS?

  • @codedamn

    @codedamn

    2 жыл бұрын

    two days

  • @tsriramaraju
    @tsriramaraju2 жыл бұрын

    Nice video, I always wonder why do u ask to leave a comment saying 'I watched till end'. is there any specific reason to it? My guess is, using an bot to get analytics. may be

  • @tamuahmed5303
    @tamuahmed53032 жыл бұрын

    Let's say an e-commerce site needs change its home page banner(image) in every year. And you cannot rebuild the whole site as it has more than 500k products. If I use ISR for the image link and set it 2 hr. then isn't it would be a waste of server resources to fetch the same image link in every 2 hr.? Also let's say we want to change to contact page totally and don't want to rebuild the other pages as other pages will remain same. What would be solution for this 2 cases?

  • @blendergaming1579

    @blendergaming1579

    2 жыл бұрын

    Save your images in an s3 bucket and reference the image and use versioning on the s3 bucket. Then you can update the image in the bucket, and always pull the latest image. Set some lifecycle policies up so the old images are deleted after x days.

  • @andrewcbuensalida
    @andrewcbuensalida Жыл бұрын

    Is this best practice?

  • @pbdivyesh
    @pbdivyesh2 жыл бұрын

    11:48 Can you please mention that person on twitter to follow? This is really articulative and detailed information thanks for making such videos.

  • @Ashwin.Ravichandran
    @Ashwin.Ravichandran2 жыл бұрын

    Discord channel link

  • @cloudpavan
    @cloudpavan2 жыл бұрын

    Hi mehul, Thanks for sharing the Tech stack, You could have used React front end and simple Backend on nodejs, leaving the client to handle all processing on front. , You could have avoided so many moving parts

  • @pruthvishetty5656

    @pruthvishetty5656

    2 жыл бұрын

    Setting up ssr, seo and more is a real pain in vanilla react. Even if you set up these using libraries then the complexity increases of deploying

  • @nooobcoder
    @nooobcoder2 жыл бұрын

    AWS please dont use log4j in lambda@edge future update now, for others to know what I am talking about, refer to the recent video about RCE by codedamn, it is an awesome explanation about the recent vulnaribility. 💖

  • @cau8777

    @cau8777

    2 жыл бұрын

    I guess you should simply update it

  • @singh.aadarsh
    @singh.aadarsh2 жыл бұрын

    Why you don't make a tutorial in practical way

  • @MdMasudulKabir
    @MdMasudulKabir10 ай бұрын

    Why i don't understand, LAMBDA, LAMBDA... !!!

  • @yournemesis8232
    @yournemesis82322 жыл бұрын

    your UI/UX designer for yt vids are sure into memes lol