Stack Overflow Asked by Ji-in Kim on December 22, 2020
I’ve deployed my Next.js portfolio website using Serverless Framework. Some magical things happened after I typed ‘npx Serverless’, though I don’t fully understand how it worked.
Two questions here…
First, I’m not sure I got this right. Does Serverless framework export all the static pages generated by ‘next build & export’ to S3 and routes pages using Lambda, unlike deploying Next.js application itself to AWS EC2 instance? So the purpose of those Lambda functions is to substitute Next.js functionalities such as Dynamic Route?
Also, I don’t get the meaning of ‘Lambda@Edge SSR Renderer’ here. I know Cloudfront and Lambda@Edge allows to connect nearby location but why it’s called ‘SSR Renderer’? Doesn’t static pages Next.js exported already contain content required that was fetched by ‘getStaticProps’ so what browser does is simply requesting Html,CSS,JavaScript files from S3?
Second, how do I re-deploy my application when there’s any changes have made? Can I just type ‘npx serverless’ again to overwrite static in S3?
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP