aws-samples / serverless-coffee-workshop

This is the repo for Serverlesspresso workshop. Questions? Contact @jbesw or @benjamin_l_s on GitHub or Twitter.
https://workshop.serverlesscoffee.com/
MIT No Attribution
99 stars 63 forks source link

Bug: Creating CF Stack Node Error #53

Closed mknoth197 closed 4 months ago

mknoth197 commented 8 months ago

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 commented 8 months ago

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

bfreiberg commented 8 months ago

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.

mknoth197 commented 8 months ago

@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

bfreiberg commented 8 months ago

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

bfreiberg commented 6 months ago

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