AWS bucket vs cloudfront for mp4 streaming

0

Hello, I am new to AWS. I have created a s3 bucket and made it public. uploaded few mp4 files and I see that I can stream those videos comfortably without any issues. I just streamed a 600mb file (video of length 1 hour) in my angular app without any issues like downloading the whole video before playing, I can change the video on the video progress bar and skip to that part of the video without any issues (mp4 on azure blob storage is not allowing to skip the video). why should I use cloudfront? I am okay with viewers downloading the videos.

已提問 1 年前檢視次數 956 次
3 個答案
1

If I understand correctly, AWS will charge you for the amount of data leaving the bucket. If a lot of people begin downloading the file, your bill could go up more than you planned for. Something to be cautious about. On the other hand, if you switch to letting cloudfront serve the file, it won't be leaving your bucket as often, possibly saving you money. But it all depends on how much traffic you can handle.

profile picture
已回答 1 年前
1
  1. Security - Making the bucket public will not allow you to track who access what objects in the bucket and per security guidelines you should always follow the security best practices
  2. Cost - Content served directly from S3 is charged at this time of writing $0.0004 per 1000 GET's requests, plus $0.09 per GB for the first 10 TB and you will have per month a free allowance of 100 GB
  3. Scalability - Amazon S3 can perform 5,500 GET/HEAD requests per second per partitioned prefix , once that limit is reached the requests will start receiving 503 response errors. Further information at https://docs.aws.amazon.com/AmazonS3/latest/userguide/optimizing-performance.html

Fronting the S3 Bucket with a CloudFront distribution endpoint will allow you to:

  • Filter who can access the bucket
  • Stop direct access to the bucket
  • Cache content closer to the edge, reducing the number of S3 requests
  • Reduce costs ($0.085 for the first 10 TB with a monthly free allowance of 1 TB)

For further information on how to restrict access to S3 Buckets with CloudFront, please see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html

AWS
Nuno_Q
已回答 1 年前
0

Two reasons :-

  1. Security :- once you make content of the bucket public or content link directly inside the application. its is wrong practice and can lead to catastrophic scenarios such as content is serving some other application without any notice to you. for that purpose also we prefer cloud Front service.

  2. Cost :- every time content leave bucket aws charge and even for the network traffic aws charge. so using to cloud front along with S3 can reduce your both cost.

for On demand video broadcasting or streaming best possible solution is to use AWS elemental Media Services. these services take care of all possible scenarios ( Security ,cost, some other feature ) and help you achieve more.

***cloud asterisk studio

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南