Giter VIP home page Giter VIP logo

lamba-thumbnailer's Issues

Error spawn EACCES

I know this has been reported in an older issue but I'm not able to resolve it. I've tried Node 6.10 and Node 8.10 and also experimented with /tmp/ffmpeg and ffmeg as the path - to no avail.

Error: spawn EACCES
at exports._errnoException (util.js:1018:11)
at ChildProcess.spawn (internal/child_process.js:319:11)
at Object.exports.spawn (child_process.js:378:9)

Directory structure of ZIP:

ffmpeg
index.js
node_modules\
package.json

Any ideas?

cp: cannot stat ‘/var/task/ffmpeg’: No such file or directory

Whew.. since the ARN to the layer provided is not working, I have tried every which way to get the layer working myself. I am quite familiar with AWS Lambda and have added many layers in the past, but this one has evaded me.

I keep getting this error below when trying to run this library with the sample code provided. I have both this library and ffmpeg installed as layers.

Any guidance you can provide would be much appreciated. Thank you.

Here is the trace:

Response:
{
"errorType": "TypeError",
"errorMessage": "lvt.S3 is not a constructor",
"trace": [
"TypeError: lvt.S3 is not a constructor",
" at Runtime.exports.handler (/var/task/index.js:9:15)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}

Request ID:
"3d9418e8-a9c9-4f94-96ba-0c0898cc2f7a"

Function logs:
START RequestId: 3d9418e8-a9c9-4f94-96ba-0c0898cc2f7a Version: $LATEST
2020-10-05T21:12:47.378Z 3d9418e8-a9c9-4f94-96ba-0c0898cc2f7a INFO {"Records":[{"eventVersion":"2.1","eventSource":"aws:s3","awsRegion":"us-west-2","eventTime":"2020-10-05T19:37:04.616Z","eventName":"ObjectCreated:Put","userIdentity":{"principalId":"AWS:AIDAYSRDSSHZ3OKC4T7VU"},"requestParameters":{"sourceIPAddress":"44.230.17.147"},"responseElements":{"x-amz-request-id":"F4334B0026CB45A7","x-amz-id-2":"srU/E35rWxvHs/iFUQvaetR4QwJVv/qT39HC2DcEXB/GQ8YEEF3QToZjveCPkDc2kmD5z2/HspFe3wH8husCU6Vjc4F1MWyt"},"s3":{"s3SchemaVersion":"1.0","configurationId":"ZjkyZDY2ODItNzU3Mi00NzM0LWIwMWMtYTJjNjgyNjVkMDAy","bucket":{"name":"contentjaguar-hosted.com","ownerIdentity":{"principalId":"AIOAF98JYAQFE"},"arn":"arn:aws:s3:::contentjaguar-hosted.com"},"object":{"key":"generated-videos/1-1/jagcomp-c1_a5_swim_418430c8-2782-410f-8404-07e461370eb3_0-d.mp4","size":6294286,"eTag":"db0a7bbf202ec7cccbe4d421ea3d9ac5","sequencer":"005F7B75E1BCB6F5FB"}}}]}
2020-10-05T21:12:47.385Z 3d9418e8-a9c9-4f94-96ba-0c0898cc2f7a ERROR Invoke Error {"errorType":"TypeError","errorMessage":"lvt.S3 is not a constructor","stack":["TypeError: lvt.S3 is not a constructor"," at Runtime.exports.handler (/var/task/index.js:9:15)"," at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"]}
2020-10-05T21:12:47.405Z 3d9418e8-a9c9-4f94-96ba-0c0898cc2f7a INFO ffmpeg permissions couldnt be set
2020-10-05T21:12:47.408Z 3d9418e8-a9c9-4f94-96ba-0c0898cc2f7a INFO Error: Command failed: cp /var/task/ffmpeg /tmp/ffmpeg && chmod 755 /tmp/ffmpeg
cp: cannot stat ‘/var/task/ffmpeg’: No such file or directory

at ChildProcess.exithandler (child_process.js:303:12)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:483:12)
at maybeClose (internal/child_process.js:1021:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:315:20)
at Socket.EventEmitter.emit (domain.js:483:12)
at Pipe.<anonymous> (net.js:674:12) {

killed: false,
code: 1,
signal: null,
cmd: 'cp /var/task/ffmpeg /tmp/ffmpeg && chmod 755 /tmp/ffmpeg'
}
2020-10-05T21:12:47.408Z 3d9418e8-a9c9-4f94-96ba-0c0898cc2f7a INFO
2020-10-05T21:12:47.408Z 3d9418e8-a9c9-4f94-96ba-0c0898cc2f7a INFO cp: cannot stat ‘/var/task/ffmpeg’: No such file or directory

Error: spawn EACCES at _errnoException (util.js:1022:11)

I got the below error from Cloudwatch logs when i triggered the lambda function form S3 PUT event.
Error: spawn EACCES
at _errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at createThumbnail (/var/task/index.js:66:36)
at nextTask (/var/task/node_modules/async/dist/async.js:5324:14)
at Object.waterfall (/var/task/node_modules/async/dist/async.js:5334:5)
at exports.handler (/var/task/index.js:60:9)

Any idea ? how to resolve it ?

You are not authorized to perform: lambda:GetLayerVersion.

Hi there--

I am configuring a layer for my lambda function which exists in us-west-2.

When adding this ARN:
arn:aws:lambda:us-west-2:260572601982:layer:ffmpeg:1

And clicking Add, I get this error:
You are not authorized to perform: lambda:GetLayerVersion.

Please advise/enable global permissions on the layer. Thanks!

thumbnails are created with size 0

i created a function and uploaded with exactly the code in this repo. everything looks like it's working, and the thumbnail file is created, but it's size is 0 and it's obviously not good

  1. do you have any idea what can cause this behavior?

  2. is there any way to see the output of ffmpeg, maybe i'll see some hints there.

by the way, i tried running ffmpeg with exactly the same parameters on my local machine, and it works correctly.

Unable to change the export time

I am using the Thumbnail property "time" as said in the documentation:

t.createThumbnail({
  ...
  time: "00:00:02",
  ...
})

but the export time isn't changing, the lib always uses the default value "00:00:10".
I think the problem is: the input var is called "time" but then in the lib is used "timestamp".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.