serverless-coffee-workshop icon indicating copy to clipboard operation
serverless-coffee-workshop copied to clipboard

Bug: Creating CF Stack Node Error

Open mknoth197 opened this issue 1 year ago • 5 comments

Was going thru the workshop and was creating the CF stack provided in the guide and the CF stack failed to spin the IaC due to a an outdated version of node not agreeing with the lambdas. Here is the error below being thrown on the console

Resource handler returned message: "The runtime parameter of nodejs14.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs20.x) while creating or updating functions. (Service: Lambda, Status Code: 400, Request ID: b7849899-a2bc-407f-9b71-a040a2f6a3d2)" (RequestToken: 8d8360a1-e5c2-928c-0161-eaf40d461301, HandlerErrorCode: InvalidRequest)

Image: image

mknoth197 avatar Feb 27 '24 03:02 mknoth197

Depending on if this is a breaking change or not, but the version of the lambdas should be bumped to nodejs20.x to avoid this error

Lambda that failed first

mknoth197 avatar Feb 27 '24 03:02 mknoth197

Hi @mknoth197 , thanks for your bug report. As you mentioned, the issue can be resolved for now by updating the runtime version of the Lambda functions to Node v16. An upgrade to Node v20 isn't as easy, as that version uses the AWS SDK v3 instead of v2.

We are currently working on updating the functions to resolve this.

bfreiberg avatar Feb 27 '24 09:02 bfreiberg

@bfreiberg , the CF template that is fetched from the Self Hosted part of the workshop is still leveraging v14

I am able to fix this myself, but just thought I would bring it to your attention

S3 link: https://ee-assets-prod-us-east-1.s3.amazonaws.com/modules/67b03f2bcecc4fafb15053897585b61f/v1/cloudformationvLatest.yml

image

Photo of CF template that is loaded

image

Error message

mknoth197 avatar Feb 27 '24 15:02 mknoth197

Hi @mknoth197 , thanks for the additional information. I'll let you know once we have released an update

bfreiberg avatar Feb 28 '24 07:02 bfreiberg

Hi, the template has been updated and it should work again. Could you please test it again

bfreiberg avatar Apr 21 '24 15:04 bfreiberg