0

I transcode videos with a Lambda function.

Example with Node.js:

transcoder.createJob(params, function(err, data) {
    if (err) {
        ...
    } else {
        ...
    }
});

Does the function hang until the video is encoded? Or is the job started then the Lambda function execution stops right away?

Thanks!

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Maxime Laval
  • 4,068
  • 8
  • 40
  • 60
  • It's pretty easy to see the execution time in the CloudWatch logs. For example, mine has something like "REPORT RequestId: 1234 Duration: 2.99 ms Billed Duration: 100 ms Memory Size: 256 MB Max Memory Used: 45 MB" That should give you a better idea. – stdunbar Aug 23 '16 at 22:12
  • Yeah I could compare the execution time to some long video transcoding time but ideally I wanted some official doc specifying exactly what happens ;-) It seems like the Lambda function terminates just after calling the transcoder. – Maxime Laval Aug 23 '16 at 23:17

1 Answers1

0

I don't think it will wait until the transcoder is done.

https://medium.com/@ratulbasak93/video-to-audio-using-elastic-transcoder-lambda-with-sns-notification-cdc8ba8a6e78

This article will be pretty much helpful and you should use the SNS notification system to let the lambda knows it.

Elastic Transcoder, Lambda with SNS Notification
David Lin
  • 24
  • 6