Reputation: 157
I could generate thumbnail with the ffmpeg package available in nodejs locally but, in aws lambda same did not work for me due to various reasons which I would like to share here.
Upvotes: -1
Views: 161
Reputation: 157
Assuming there is already a s3 bucket created
Step 1
create a lambda function Ex: generateVideoThumbnail
step 2
create a layer to be used in the lambda ex: videoThumbnailLayer [Layer is a collection of the modules to be used for this lambda to work and achieve our target goal. Which can be either uploaded or can be linked from the s3 bucket. Note: we have a limit of 50mb if we are uploading any.]
step 3
Provide permission necessary for lambda and s3Bucket. This is the place where I was stuck. For generating thumbnail of the images we do not need to provide any permission to our bucket. But the thumbnail generation of the video, we need to provide appropriate read i.e . GET permission [and later we are uploading so write i.e. PUT permission (optional)] to the lambda function in the s3Bucket permission otherwise we can generate image and upload but the image will be empty.
Upvotes: -1