Issue
I have an FFMPEG executable as a Lambda Layer, deployed with Serverless framework. Unfortunately I'm not able to execute it, getting AccessDenied & EACCESS errors.
I'm tried fixing it with FS-CHMOD like the following:
chmodSync('/opt/ffmpeg/ffmpeg', 0o100);
And getting this error:
Error EROFS: read-only file system, chmod '/opt/ffmpeg/ffmpeg'
My question is... what now?
Solution
For anyone on Windows (like me) who finds this in future - Lambda file permissions are set outside of Lambda, and you'll need to boot a Linux VM (or a Mac) to change CHMOD stuff on files that will end up on Lambda.
Answered By - user3526037 Answer Checked By - Candace Johnson (WPSolving Volunteer)