1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
1
The error message you are receiving indicates that the Node.js 14.x runtime is no longer supported for Lambda functions. AWS recommends using the newer Node.js 20.x runtime instead.
To resolve this issue:
- Update your Lambda function configuration to use the Node.js 20.x runtime instead of Node.js 14.x. You can do this by editing the function properties in the AWS Lambda console or AWS CLI/SDK.
- Ensure any dependencies like the AWS SDK for JavaScript are compatible with Node.js 20.x. The version of the SDK included in the Lambda runtime has been updated from v2 to v3 starting with Node.js 18.x.
- If your code is using features that are not supported in Node.js 20.x, you may need to update the code as well.
- You can also create a Lambda layer containing custom dependencies instead of relying on what is included in the runtime. This gives you more control over versions.
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- Come posso risolvere l'errore "Custom Named Resource already exists in stack" in AWS CloudFormation?AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 4 mesi fa
- AWS UFFICIALEAggiornata 3 anni fa
Hi Giovanni, Thanks for responding. Yeah I updated my node version to 20 and also modified my files within the directory via npx aws-sdk-js-codemod@latest -t v2-to-v3/Users/nicholasortiz/amazon-rekognition-custom-brand-detection/deployment
and I also rebuilt and deployed the stack but now the stack won't create because of ROLLBACK FAILED The following resource(s) failed to delete: [PrivateWorkforceConfiguration]
The root cause of this is Received response status [FAILED] from custom resource. Message returned: Cannot find module 'aws-sdk' Require stack: - /var/task/lib/sagemaker/privateWorkforce.js - /var/task/lib/sagemaker/index.js - /var/task/index.js - /var/runtime/index.mjs. I can't manually delete the stack because I get the same error and I'm not sure how to move forward at this point. It seems as though I'm in an endless cycle. Very frustrating to say the least.