dataall icon indicating copy to clipboard operation
dataall copied to clipboard

Upgrade lambdas using v16 Node.js runtime

Open zsaltys opened this issue 1 year ago • 6 comments

Node.js v16 runtime is scheduled to be deprecated Jun 12, 2024. Therefore we should upgrade all lambdas to Node.js 20 runtime.

zsaltys avatar Jan 02 '24 15:01 zsaltys

Hi @zsaltys - for the above 2 lambdas:

  • dataall-prod-cloudfront-s-dataallprodhttpheadersre-GNuyR1QHIu8V: This lambda gets created on dataall/deploy/stacks/cloudfront.py L451-484 and has specified Node Version 18 as of this PR (included in data.all v2.1) Do you have the same?

  • dataall-prod-backend-stag-CognitoProviderprodframe-Ah0lxIGGFhlw: The lambda function that backs the custom resource provider and is created at dataall/deploy/stacks/cognito.py L274. There is no explicit runtime property provided but when looking at my data.all deployment it defaults to Node.js 18

Strangely I have no node 14 runtimes for my lambda functions that deploy the latest data.all OS code

noah-paige avatar Jan 02 '24 15:01 noah-paige

@noah-paige do you have any runtimes below 18? I wonder if there's an issue that new deployments do not update runtimes. Our version is still 2.0. Were the runtimes updated after 2.0 ?

zsaltys avatar Jan 02 '24 16:01 zsaltys

Lambda Runtimes were updated in 2.1 (PR)

There should be no node 14 runtimes but there still are some node 16 ones from the way we handle auth on the userguide that will have to be updated in the near future

noah-paige avatar Jan 02 '24 16:01 noah-paige

@noah-paige I repurposed the ticket to upgrade all lambda runtimes to v20. Thanks!

zsaltys avatar Jan 02 '24 16:01 zsaltys

As of current data.all deployment - the only node16 runtimes are present because of the AuthAtEdge Serverless Application Repo we use to protect the static site userguide with Cognito IdP (link to AuthAtEdge Repo)

On the AuthAtEdge Repo they have a pending issue to upgrade Node before the end of support on June 12, 2024, meaning we could potentially wait for that upgrade to happen rather than prioritize for v2.3 of data.all

Also, depending on how we decide to implement userguide auth guard for external IdPs (no dependency on Cognito, i.e. this issue) we may remove the AuthAtEdge package altogether and create custom edge lambdas to handle auth piece for userguide

noah-paige avatar Jan 10 '24 16:01 noah-paige

Because of the details mentioned in the above comment - this issue will be removed from v2.3 release and will be re-prioritized to be picked up at the same time as issue #872

noah-paige avatar Jan 18 '24 17:01 noah-paige

@noah-paige can this be closed ? i see its moved to Done in the backlog

anmolsgandhi avatar Jun 11 '24 03:06 anmolsgandhi

@anmolsgandhi - need to update the semanticVersion of the AuthAtEdge application we currently use - this is a good call out as we need to update from v16 asap

Looking into migration path and will open a PR shortly if no blockers

noah-paige avatar Jun 11 '24 03:06 noah-paige