DK I think the github zip wraps the content in a folder "imageresizer-main", please make sure you upload to lambda the code from the folder, so the index.js goes in the root
darwin-x64' binaries cannot be used on the 'linux-x64' platform. Please remove the 'node_modules/sharp' directory and run 'npm install' on the 'linux-x64' platform.
The error message suggests node_modules was populated by running npm install on macOS/Darwin, which won't work on Linux. Make sure you're not sharing or copying an external node_modules within the Linux container.
=> It means that we should delete node_modules and run npm install in linux os not macos
Richathon Thank you for your reply. So I need a machine running Linux to re-compile the script to make the Lamda function work? I am using macOS right now, but I didn't run npm install. I just downloaded the zip file and upload it to Lamda.