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

How to change Node Version in Lambda Function that hosts Nextjs SSR #3295

Closed
4 tasks done
saulonunesdev opened this issue Feb 7, 2023 · 11 comments
Closed
4 tasks done
Labels
archived This issue has been locked. compute feature-request New feature or request

Comments

@saulonunesdev
Copy link

saulonunesdev commented Feb 7, 2023

Before opening, please confirm:

App Id

d3vc58cpnaxzh9

AWS Region

us-east-2

Amplify Hosting feature

Deployments

Question

Hi, Thanks for the support and sorry if this is a duplicate, but I've researched a lot and couldn't find any docs or issues related.

I have a nextjs app that needs to run on node18, you can see the issue below.
image

I've already tried the following:

  • set engines to 18.x in package.json
  • update environment variable of NODE_VERSION to 18.x
  • update the build settings to use a custom docker image: node:18.2.0
  • created a lambda function with node18.x in the backend, but i failed to use that function as a runtimer
    • Update Runtime in amplify/backend/function/YOURLAMBDA/yourlambda-cloudformation-template.json
  • Set node version in .nvmrc file in the project root

Here is the repo example: https://github.com/Sirge-io/test-amplify

PS: Just to be clear, i'm not talking about the functions that we can add into amplify/function but the lambda that hosts the frontend

Any Help is much appreciated. Thanks.

@saulonunesdev saulonunesdev added the question Further information is requested label Feb 7, 2023
@ghost ghost self-assigned this Feb 8, 2023
@ghost ghost added the compute label Feb 8, 2023
@ghost
Copy link

ghost commented Feb 8, 2023

Hi @saulonunesdev, thanks for raising this question. Updating the runtime for Lambda functions hosting SSR apps is not supported at this time. We will keep this open as a feature request instead. We apologize for this inconvenience.

@saulonunesdev
Copy link
Author

Thanks @hloriana ^^

@Jay2113 Jay2113 added feature-request New feature or request and removed question Further information is requested labels Feb 8, 2023
@github-actions
Copy link

github-actions bot commented Feb 8, 2023

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!

@ghost ghost removed their assignment Apr 14, 2023
@antoniogiordano
Copy link

@hloriii any update on this? I have a NextJS app that can be compiled only with Node14 but it seems there is no way to specify a lambda runtime different from 16

@valenciaHQ
Copy link

Up to this, we need this.

@james-simpson-ST
Copy link

We have a need for this also and would like to be able to ensure our runtime is using the latest LTS node supported by AWS lambda (currently node 18 at the time of writing)

@stefanofa
Copy link

image

Next 14.0.0 has just been released and the minimum version of node to use it is now 18.17.0.

@clementAC
Copy link

We definitively need to run our public faced application on maintained environment and lot of lib are dropping node 16 so basically with amplify we are stuck to not update our application

@saulonunesdev
Copy link
Author

here is the solution

Amplify Hosting now has Next.js 14 support as well. To use this new feature, set amplify:al2023 as the value for the custom build image if this is the app’s first deployment

https://aws.amazon.com/blogs/mobile/6-new-aws-amplify-launches-to-make-frontend-development-easier/

Copy link

github-actions bot commented Dec 6, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Copy link

github-actions bot commented Dec 6, 2023

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Dec 6, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. compute feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants