By using AWS re:Post, you agree to the Terms of Use

Number of views a stored video gets


Hello We have a video file stored on AWS, is it possible to know how many views the video had? Thanks

1 Answers

Hello and thanks for using AWS re:Post.

If your video is stored in S3, you may enable data events for your S3 bucket to track object-level S3 actions. Once enabled, object-level API calls are logged as CloudTrail events. The primary object level API call you can index would be GetObject. While this action isn't equivalent to views, it does confirm the number of times the object (video) was requested. You can additionally track the time, source IP and User Agent attributed to the video request. When enabled, CloudTrail will place the logged events as JSON objects in your S3 bucket. The most efficient way to query the collected CloudTrail data is to use Amazon Athena to index and query the CloudTrail logs.

Additional References: Amazon S3 CloudTrail Events | Enable CloudTrail event logging fo S3 | Logging Data Events | Logging options for S3

profile picture
answered 20 days ago
  • Thank you very much for the answer, Adrian. Could you give me a bit of guidance on how to do this or where to learn how to do it because I really didn't understand the technical instructions :-( Thanks Sam

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions