Search code examples
amazon-web-servicesffmpegaws-lambda

How to Install ffmpeg on aws lambda machine?


I'm trying to run a node js script on AWS lambda that uses ffmpeg. To do this, I need to install ffmpeg on the machine itself.

I have looked through the documentation but I could not find how to connect to the machine that runs the lambda.


Solution

  • 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.