DEV Community

Discussion on: Deploy your first Node 20 Lambda function on AWS!

Collapse
 
fmcdev profile image
fmcdev

I'd like to add a suggestion that got me crazy when trying to migrate AWS Lambda functions from nodejs 16 to nodejs 20. The issue is that aws-sdk changed from V2 to V3 in the meanwhile and AWS.util.uuid.v4() is not available anymore. You can solve using:
const { randomUUID: AWS_util_uuid_v4 } = require('crypto');
and then use AWS_util_uuid_v4() where you used AWS.util.uuid.v4() before. Hope this can help. Bye