DSGT-DLP / Deep-Learning-Playground

Web Application where people new to Deep Learning can input a dataset and toy around with basic Pytorch modules without writing any code
MIT License
26 stars 8 forks source link

[BUG]: Node runtime of SST lambdas on old version of Node #1026

Open karkir0003 opened 1 year ago

karkir0003 commented 1 year ago

Operating system

Windows, MacOS, Linux

Bug description

Problem AWS has been sending emails to DLP saying that the node runtime of the API Gateway Lambda endpoints were running on Node 14 and that we are recommended to use Node js v18 as the runtime.

Solution For the Api construct in SST (under AppStack.ts, set the runtime prop for the lambda (under default: {functions: {...}}) to be "nodejs18.x". View these links from SST for more detail:

https://docs.sst.dev/constructs/Api - configure Function property within the Api construct https://docs.sst.dev/constructs/Function#runtime - function runtime property Testing Methodology

cd serverless && yarn sst dev - deploy api to dev stack (set resource name as dev) and then see if the nodejs runtime is version 18 Make sure to run an SST prod deploy when ready right about when you merge PR

Other considerations

Github action to automatically do sst deploy Github action to validate if the AppStack.ts is configured correctly dev vs. prod stack best practice (@dwu359 can you comment here)

Steps to reproduce

Go to AWS Management console and view the API Gateway Lambdas

github-actions[bot] commented 1 year ago

Hello @karkir0003! Thank you for submitting the Bug Request Form. We appreciate your contribution. :wave:

We will look into it and provide a response as soon as possible.

To work on this bug request, you can follow these branch setup instructions:

  1. Checkout the main branch:

     git checkout nextjs
  2. Pull the latest changes from the remote main branch:

     git pull origin nextjs
  3. Create a new branch specific to this bug request using the issue number:

     git checkout -b bug-1026

    Feel free to make the necessary changes in this branch and submit a pull request when you're ready.

    Best regards, Deep Learning Playground (DLP) Team