DEV Community

Discussion on: How do I create thumbnails when I upload a video? aws lambda!

Collapse
 
jetsondavis profile image
Jeff Davidson • Edited

Hey Ben,

Thanks for the post. I get 3 jpg files in my bucket's 'cache' folder which are black frames with the following striped across the top.

The image “myapp.s3-us-west-1.amazonaws.com/c... cannot be displayed because it contains errors."

No thumbnail folder is created.

Any thoughts?

Thanks!

Thx!

Collapse
 
benjaminadk profile image
benjaminadk

I'm not sure. I guess the first thing i might try is logging the srcKey and dstKey variables since the dst key should be creating the thumbnails folder when an image is uploaded. Put the console.log statements in a then you can check them in the cloud watch reports. I copied my exact code to a gist just i case there was some kind of typo or something.

Collapse
 
jetsondavis profile image
Jeff Davidson

Thanks for the response. I ended up using my web server & ffmpeg to create the thumbs and upload them. You have inspired me to learn more about Lambda, however! Thx