amazon-cloudfront

Amazon CloudFront - protect video with Signed URL

我的梦境 提交于 2020-01-14 02:51:09
问题 BACKGROUND: Amazon Cloudfront video delivery with S3 storage: I am using a custom 360-degree video player. The player simply links to MP4 videos. The videos are not streamed but just a direct link with progressive download. ISSUE TO SOLVE ---> Signed URL 1) The videos should ONLY play back from my website and not from other websites. Otherwise someone will just hotlink to the videofiles, and I will have to pay for the Amazon traffic. 2) Where and how to insert CloudFront "Signed URL" policies

Can someone walk me through serving gzipped files from Cloudfront via S3 origin?

[亡魂溺海] 提交于 2020-01-11 04:04:12
问题 I've been through quite a few suggestions given on this topic from other posts on Stackoverflow, but I'm still not successfully getting it to work. The website origin is on S3, it is being served via Cloudfront. Going through the other posts and Amazon docs, I'm seeing suggestions such as: 1) Gzip the necessary files, remove the .gz from the files name, but on uploading, still set the meta to gzip. This isn't working for me. Safari just downloads the gzipped file(s) instead of serving as a

How to restrict Cloudfront access to my domain only?

梦想的初衷 提交于 2020-01-07 08:22:47
问题 i need to find a solution how to do it. Basically i have one .m3u8 video and i want to restrict it to be only played on my domain. Basically what are people doing right now, is stealing my video and playing on their sites, which causes big overload and a lot of bandwidth... d23ek3kf.cloudfront.net/video.m3u8 > mydomain.com > video accessable d23ek3kf.cloudfront.net/video.m3u8 > randomdomain.com > video not accessable 回答1: The way to do it is using signed URLs. Your website will generate

Amazon S3 images cache-control not being applied

故事扮演 提交于 2020-01-07 06:17:56
问题 I searched all over and found a method to cache images on Amazon S3. Whenever I upload an image, I add a meta element of cache-control and then set max-age=86400 . However, on any sort of speed test site it says that my images do not have a cache applied to them. I am not sure if it matters, but I have CloudFront linked to this S3 bucket. Sorry, but completely new to AWS. Anyone know why my images may not be caching? 回答1: on any sort of speed test site it says that my images do not have a

Adding Lambda@edge includebody field in cloudfront using cloudformation template?

帅比萌擦擦* 提交于 2020-01-06 03:54:22
问题 I am trying to add Lambda@Edge association in cloudfront using cloudformation. As per aws docs they had only two fields like EventType and LambdaFunctionARN . But i want to add IncludeBody in cloudformation so that my Lambda@Edge will read the body of the request . When i try to add IncludeBody in cloudformation it is saying error like invalid property . "LambdaFunctionAssociations": [ { "EventType": "origin-response", "IncludeBody":"true" -- Invalid property error "LambdaFunctionARN": "arn

React router links in app broken after move to cloudfront + SSL

不打扰是莪最后的温柔 提交于 2020-01-04 03:51:29
问题 I have a react app, using react-router hosted in an S3 bucket, using Route53 as a DNS provider. The app worked fine with the Route53 config pointing to the S3 bucket. Since I want to use SSL, I created a Cloudfront distribution pointing to the bucket, with an SSL cert., and pointed the DNS to it. Since doing that, none of the links work, (example.com works, but example.com/foo does not). It just returns a NoSuchKey error. I know that this is incorrect, as the key is definitely there, and it

How to secure downloads using Cloudfront

删除回忆录丶 提交于 2020-01-03 02:48:10
问题 I have videos containing educational content. I'd like to distribute these videos using S3 and my DNN site. I've created my s3 bucket with all the videos. I'd like users to be able to log in and be able to download the videos that they have paid for. Also, i'd like to prevent users from sharing video urls(hotlinking). I've looked into private distributions but it seems a little complicated as far as signed urls. Ideally, I'd have some kind of a policy on cloudfront that would only allow

Streaming with CloudFront to JWPlayer

こ雲淡風輕ζ 提交于 2020-01-01 12:12:16
问题 I followed the following tutorial: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/TutorialStreamingJWPlayer.html And I hosted my html codes inside localhost (at the moment). I get the player opened but player do not play any videos. It just keep rotating (indicating its still loading). But nothing buffers or nothing else happens. <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript"

Why is CloudFront varying CORS headers response based on Accept-Encoding?

独自空忆成欢 提交于 2020-01-01 07:40:09
问题 I'm trying to get CORS to work properly with Amazon S3 + CloudFront. After setting my CORS Configuration, it seems to work properly: $ curl -H "Origin: https://app.close.io" -I "https://d4389n07pf8cq.cloudfront.net/built/app.9e1f9ee9.js" -s | grep Access Access-Control-Allow-Origin: https://app.close.io Access-Control-Allow-Methods: GET, HEAD Access-Control-Max-Age: 3000 Access-Control-Allow-Credentials: true But when the resource is requested with Accept-Encoding: gzip then the CORS headers

Simple example to restrict access to Cloudfront(S3) files from some users but not others

丶灬走出姿态 提交于 2020-01-01 06:28:08
问题 I'm just getting started with permissions on AWS S3 and Cloudfront so please take it easy on me. Two main questions: I'd like to allow access to some users (e.g., those that are logged in) but not others. I assume I need to be using ACLs instead of a bucket policy since the former is more customizable in that you can identify the user in the URL with query parameters. First of all is this correct? Can someone point me to the plainest english description of how to do this on a file/user-by