aws-samples / aws-step-functions-kendra-web-crawler-search-engine

This sample aims to demonstrate how to create a serverless web crawler and search engine, using AWS Lambda, AWS Step Functions, and Amazon Kendra
https://aws.amazon.com/blogs/architecture/scaling-up-a-serverless-web-crawler-and-search-engine/
MIT No Attribution
114 stars 34 forks source link

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. #28

Closed tjpatter closed 2 weeks ago

tjpatter commented 5 months ago

Since the deprecation of nodejs14.x, we can no longer deploy this sample.

Full error, "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: cf10507b-fd6b-465f-9f0e-f9058cbc679b)"

turnoutnow-saurabhraut commented 5 months ago

We are also facing the same issue. +1

doubledjd commented 4 months ago

I also had the issue. Upgraded aws-cdk, aws-cdk-lib, aws-sdk with npm. Then modified https://github.com/aws-samples/aws-step-functions-kendra-web-crawler-search-engine/blob/main/src/constructs/webcrawler/web-crawler-lambda.ts#L22 to

runtime: Runtime.NODEJS_20_X,

cogwirrel commented 2 weeks ago

Hi all,

Apologies for the long delay - I've just returned from parental leave!

I've pushed a fix for this here: https://github.com/aws-samples/aws-step-functions-kendra-web-crawler-search-engine/commit/177afc6973f505b62a2a9f2d54b440556d982427

Note that simply updating the lambda runtime to Node v20 wasn't sufficient - puppeteer would actually fail with this issue: https://github.com/alixaxel/chrome-aws-lambda/issues/305

I've migrated the crawler to use https://github.com/Sparticuz/chromium instead of https://github.com/alixaxel/chrome-aws-lambda as the latter is no longer maintained and has fallen behind with puppeteer versions.

Cheers, Jack