AWS Lambda permission denied when trying to use ffmpeg
AWS Lambda runs on Amazon Linux. It is a known issue. Try building (with static enabled) and check if it works on Amazon Linux and upload that binary. You do not have the privileges to chmod
the files in /var/task/
. Or try this solution that works:
- Move
ffmpeg
to/tmp
chmod 755 /tmp/ffmpeg
- Call
/tmp/ffmpeg
See this discussion for more info.
AccessDenied executable in AWS Lambda Layer - FFMPEG
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.
How to Install ffmpeg on aws lambda machine?
You don't ever connect to the "machine" the Lambda is running on. There is no single machine the function runs on, and the function isn't even deployed until the first time it is called. The Lambda runs in one or more containers that are created and deleted on demand as requests come in. You have to include anything like ffmpeg in your Lambda's deployment package itself, so it will be there every time your function is deployed to a container.
Any binaries you include in your function's deployment package need to be built for Amazon Linux, which is the operating system Lambda runs on. You can either use an EC2 server to build the binaries or search for someone that has already packaged ffmpeg for Lambda and made it available.
Related Topics
Using Bash Script to Feed Input to Command Line
Write(2)/Read(2) Atomicity Between Processes in Linux
Linux Find File Names with Given String Recursively
Remote Linux Server to Remote Linux Server Dir Copy. How
Delete All System V Shared Memory and Semaphores on Unix-Like Systems
Redirect Standard Input Dynamically in a Bash Script
How to Test If Your Linux Support Sse2
How to Find The Processor Queue Length in Linux
In Linux, How to Find Out Which Pci Card Is Plugged into Which Pci Slot
List Only Duplicate Lines Based on One Column from a Semi-Colon Delimited File
How to *Only* Get the Number of Bytes Available on a Disk in Bash
What Is the Meaning of Each Line of the Assembly Output of a C Hello World
Linux Command Line Howto Accept Pairing for Bluetooth Device Without Pin
What's the Best Way to Distribute a Binary Application for Linux
What Do the .Eh_Frame and .Eh_Frame_Hdr Sections Store, Exactly
Why Is "Echo Foo | Read a ; Echo $A" Not Working as Expected