0

I am created a lambda trigger , when a video file uploaded in a s3 input bucket, it will create a thumbnail in output bucket, but I don't know how to access it. Please help me.

Iam generating 3 thumbnail from a single video, in this bottom image , there this 4 video.

But I have the name of the file as dfdf and treasersonthing and vijay.treaser.ve and vollyball , but I want all 3 images using this file name.

enter image description here

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Venkatesh
  • 58
  • 8
  • Click on the asset, from there you get the url for that resource - Make sure either the Lambda has access to that resource if the asset is private, or make sure the asset is set to publicly available if ok to do so – ale917k Dec 10 '22 at 12:14

1 Answers1

2

The question is quite open - do you want to access the generated thumbnails on the frontend of your website? If so, I will try and provide some ideas for the architecture, based on some assumptions.

Publicly Accessible Thumbnails

Assuming you want to make the thumbnails publicly accessible, S3 can expose them through its own HTTP endpoint. See AWS documentation. Please note that this involves enabling Public Access on your bucket, which can potentially be risky. See How can I secure files in my Amazon S3 bucket for more information. While this is an option, I'm not going to elaborate on it, as it's probably not the best.

The preferred way is to have a CloudFront distribution serve files from your S3 bucket. This has the advantages of a typical CDN - you can have edge locations caching your files across the globe, thus reducing the latencies your customers see. See this official guide on how to proceed with this CloudFront + S3 solution.

Restricted-access Thumbnails

If your thumbnails are not meant to be public, then you can consider two options:

  • implement your own service (hosted on any compute engine you prefer) to handle the authentication & authorization, then return the files to your customers, or
  • use the CloudFront + S3 solution and control the authentication and authorization with Lambda@Edge. See AWS docs.
Victor
  • 13,914
  • 19
  • 78
  • 147