Lambda机器上安装ffmpeg

Lambda机器上安装ffmpeg

本文介绍了如何在AWS Lambda机器上安装ffmpeg?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在使用ffmpeg的AWS Lambda上运行Node js脚本.为此,我需要在计算机本身上安装ffmpeg.

我已经阅读了文档,但是找不到如何连接到运行lambda的计算机.

解决方案

您永远不会连接到Lambda运行所在的计算机".没有运行该功能的机器,并且直到第一次调用该功能时才部署该功能. Lambda在一个或多个容器中运行,这些容器可根据请求进入并根据需要创建和删除.您必须在lambda的部署包本身中包含ffmpeg之类的内容,因此每次将功能部署到容器中时,它就会存在./p>

您需要在函数的部署程序包中包含的任何二进制文件都针对Amazon Linux(Lambda运行于其上的操作系统)构建.您可以使用EC2服务器来构建二进制文件,或者搜索已经为mb打包ffmpeg并使其可用的人.

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 trhough the documentation but I could not find how to connect to the machine that runs the lambda.

解决方案

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.

这篇关于如何在AWS Lambda机器上安装ffmpeg?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 15:57