Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide example of using Pulumi to deploy NextJS app on AWS #779

Closed
thesobercoder opened this issue Aug 28, 2020 · 8 comments · Fixed by #1475
Closed

Provide example of using Pulumi to deploy NextJS app on AWS #779

thesobercoder opened this issue Aug 28, 2020 · 8 comments · Fixed by #1475
Assignees
Labels
help-wanted We'd love your contributions on this issue kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@thesobercoder
Copy link

Please provide an example of how to use Pulumi to deploy NextJS to AWS replicating how deployments work on Vercel infrastructure with edge network.

I'm looking for an example which replicates the same behavior as this component does for serverless.

@leezen leezen added help-wanted We'd love your contributions on this issue kind/enhancement Improvements or new features labels Aug 29, 2020
@vha14
Copy link

vha14 commented Feb 5, 2021

I'm giving this a crack, starting with https://github.com/dealmore/terraform-aws-next-js

@tlinhart
Copy link

@thesobercoder According to this issue, there's a chance that v2 will come closer to what you (and me as well) desire.

@gunar
Copy link

gunar commented Apr 26, 2021

A basic example—onto which we'd build later on—might be:

  • Serving static content from CloudFront
  • Deploying all api routes as a single Lambda

In theory, next build provides all things necessary for this to work.

@blackgirlbytes
Copy link

for anyone struggling to find the answer to this like I was..I attempted to upload this to an S3 bucket, but struggled due to lack of information.

What worked for me:

  • I ran npm build && npm export which generated the static HTML files for me.
  • Then I ran aws s3 sync ../{folder path}/ s3://$(pulumi stack output bucketName) --acl public-read

@expelledboy
Copy link

I can not find (and trust I have looked) any working example with pulumi. However, I have found a template to start from to begin the process. Scary stuff...

@T04435
Copy link

T04435 commented May 3, 2023

Any updates on this, using Pulumi not any other infra as code provider?

Thanks.

@AutomationD
Copy link

AutomationD commented Aug 6, 2023

How critical is the advantage of the Edge deployment vs EC2/ECS + Cloudfront / Cloudflare?
It seems like Next changes stuff so often that investing into Edge is not even worth it as much?

@lukehoban
Copy link
Member

The PR at #1475 includes an example of a component that deploys the infrastructure needed to deploy a high-performance Next.js site on AWS using Pulumi. This leverages OpenNext which providers a more robust way to package Next.js builds for AWS (and AWS serverless specifically).

@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted We'd love your contributions on this issue kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.