I am receiving this Error when trying to use UUID Module in AWS Lambda JavaScript code.
Error: Cannot find module 'uuid/v4'
I am not using AWSCLI or NPM, i am instead using the AWS Lambda dashboard to author the Lambda Functions in JavaScript.
const AWS = require('aws-sdk');
const AWSUUID = require('uuid/v4');
const AWSGamelift = new AWS.GameLift();
exports.handler = async (event) =>
{
//...
Ive been searching Google nonstop trying to find a way to get the UUID Module to work. I do not want to have to setup and use an NPM environment.
Is there some method on the AWS Lambda dashboard to provide access to the UUID Module for Lambda code?
You need to install uuid
package. uuid
recently did a breaking change, the way you use it. New way is
const {"v4": uuidv4} = require('uuid');
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With