When I worked with AWS lambda function for creating a thumbnail for images uploaded to a S3 bucket. I am facing the following error while lambda test.
errorMessage": "Cannot find module '/var/task/CreateThumbnail'
The reason for this issue is because of non proper zip the contents that we uploaded to lambda function.
zip -r ../yourfilename.zip *
Your folder may contain your index.js, node_modules, etc. files. Upload the new yourfilename.zip in your lambda function and try to run the test, the issue got fixed.
errorMessage": "Cannot find module '/var/task/CreateThumbnail'
The reason for this issue is because of non proper zip the contents that we uploaded to lambda function.
zip -r ../yourfilename.zip *
Your folder may contain your index.js, node_modules, etc. files. Upload the new yourfilename.zip in your lambda function and try to run the test, the issue got fixed.
No comments:
Post a Comment