How to use permission account id for accessing vid

2019-08-07 19:15发布

问题:

I have uploaded a video in my AWS S3 and I want to play the video in HTML5 video player. I don't want to make the video accessed publicly. I have been given an account user id in the permission section, but IDK how to use it. Can someone tell me how I can use my video file with my account id? Thanks.

Video Link: https://s3-ap-southeast-2.amazonaws.com/[THE-BUCKET]/[FOLDER]/video.mp4.

MY AWS ACCOUNT USER ID (for example use): 2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5

So far I have got this: https://s3-ap-southeast-2.amazonaws.com/[THE-BUCKET]/[FOLDER]/video.mp4&AWSAccessKeyId=2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5

The Problem I'm getting:

回答1:

To allow a video file to be played from Amazon S3, it will need to be accessible by your users.

You can limit access by keeping the video private and then having your application generate a Pre-Signed URL, which is a time-limited URL that grants access to an object.

Alternatively, you can serve the video via Amazon CloudFront, which can serve the video via protocols that allow it to be played in a browser, but not directly downloaded.

See: Working with RTMP Distributions - Amazon CloudFront