- Newest
- Most votes
- Most comments
Thank you for reaching out to us. As you mentioned that the you copied the working function code to another lambda function and modified its code before it started giving errors. I would like to note that the error arises due to any missing dependencies which in your case is "snapshot" or incorrect handler settings specified. In your case, I checked there is no such module by name "snapshot.mjs" in nodejs so we can rule this out. Further, I would suggest verifying the handler settings of both the lambda functions. The working lambda function must have the handler file by the name snapshot while the lambda function created by you would have the file name as index.mjs by default. Additionally, check the handler function name inside the code which might also be different. Please refer to this document for more information related to creating a handler in nodejs https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago