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:
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 (underAppStack.ts
, set theruntime
prop for the lambda (underdefault: {functions: {...}}
) to be "nodejs18.x". View these links from SST for more detail:Api
constructTesting Methodology
cd serverless && yarn sst dev
- deploy api to dev stack (set resource name asdev
) and then see if the nodejs runtime is version 18Other considerations
AppStack.ts
is configured correctlydev vs. prod stack
best practice (@dwu359 can you comment here)