editly
editly copied to clipboard
Run editly in AWS lambda
Has anyone attempted to run a Nodejs project with editly in AWS lambda? Seems every request to the lambda fails with:
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module '../build/Release/canvas.node'\nRequire stack:\n- /var/task/node_modules/canvas/lib/bindings.js\n- /var/task/node_modules/canvas/lib/canvas.js\n- /var/task/node_modules/canvas/index.js\n- /var/task/node_modules/jsdom/lib/jsdom/utils.js\n- /var/task/node_modules/jsdom/lib/jsdom/browser/Window.js\n- /var/task/node_modules/jsdom/lib/api.js\n- /var/task/node_modules/fabric/dist/fabric.js\n- /var/task/node_modules/editly/sources/fabricFrameSource.js\n- /var/task/node_modules/editly/index.js\n- /var/task/handler.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js",
"stack": [
"Runtime.ImportModuleError: Error: Cannot find module '../build/Release/canvas.node'",
"Require stack:",
"- /var/task/node_modules/canvas/lib/bindings.js",
"- /var/task/node_modules/canvas/lib/canvas.js",
"- /var/task/node_modules/canvas/index.js",
"- /var/task/node_modules/jsdom/lib/jsdom/utils.js",
"- /var/task/node_modules/jsdom/lib/jsdom/browser/Window.js",
"- /var/task/node_modules/jsdom/lib/api.js",
"- /var/task/node_modules/fabric/dist/fabric.js",
"- /var/task/node_modules/editly/sources/fabricFrameSource.js",
"- /var/task/node_modules/editly/index.js",
"- /var/task/handler.js",
"- /var/runtime/UserFunction.js",
"- /var/runtime/index.js",
" at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object.
The lambda was deployed with serverless and npm packages were installed on a Amazon Linux 2 AMI.
Does this help? https://github.com/Automattic/node-canvas/wiki/Installation:-AWS-Lambda
If anyone created a working AWS lambda with editly I would like to try it out, willing to pay for it as well.
Wth the new docker file it may be easier to get it working now
@ariel-frischer any updates, I am willing to pay for it as well
@tsejerome Sorry no updates for this, we are working on deployment using EKS clusters instead atm.
Glad to see such support. Feel free to join @mifi's sponsors too: https://mifi.no/thanks/
Wth the new docker file it may be easier to get it working now
is there any step by step tutorial for deploying this please
No, but feel free to make one!
Found that editly uses "xvfb-run" to create a virtual screen and get the frames from that. It is a software that needs to run in the background continuously So, running it would not be possible in AWS Lambda
Can't the code that runs editly also use child_process to start xvfb-run in the backgroiund?