amazon-cloudfront

Confused about streaming video in HTML5

最后都变了- 提交于 2019-12-08 04:50:17
问题 What is the best way to play HTML5 video istantly from an Amazon Cloudfront distribution? I've done lots of research on the subject, and can't seem to work out the best way of doing it. I'm currently using popcorn.js, and have tried with video.js as well. Video is working, it's just not playing straight away on all browsers. In IE it seems to download the whole file first. What's the simplest solution for HTML5 video using MP4s on an Amazon Cloudfront distribution at the moment? 回答1: If you

Hosting static HTML in a Play! app on CloudFront

a 夏天 提交于 2019-12-08 02:01:59
问题 I have a (high-traffic) chunk of my website that is entirely static. All the site's URLs are relative, so right now it all works if I just point my browser to http://gj232j2j213.cloudfront.net/blah . I'd like to host the entire thing (not just images and css, but the HTML too) on Cloudfont (or some other CDN). Ideally, I could put something like: GET /static/ staticDir:http://gj232j2j213.cloudfront.net/blah in my routes file. That way my URLs would look like www.mydomain.com/static/main.html

How to display Font Awesome icons in Firefox?

▼魔方 西西 提交于 2019-12-07 21:52:16
问题 I'm using the Font-Awesome-Sass-Rails gem for icon fonts and they display properly in all browsers but Firefox. I'm currently using Cloudfront and Nginx. Here is my CORS configuration: <?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSeconds> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration> Any ideas? 回答1: If the

How to generate signed URLs for Amazon S3 exposed by CloudFront using.NET

…衆ロ難τιáo~ 提交于 2019-12-07 18:55:02
问题 The thing I want to achieve is to generate a singedURL pointing CloudFront distribution which originates from S3 bucket. I have managed to sign the URL which points directly to the S3 bucket as described in following AWS spec - Generate a Presigned Object URL Using AWS SDK for .NET and it worked fine. But what I really need is to generate signed CloudFront URL. I assume my Distribution is properly configured as I'm able to access it using (https://d298o8yem5c56d.cloudfront.net/123.pdf)

AWS cli query to get to cloudfront “Domain Name” with specific origin name

天涯浪子 提交于 2019-12-07 18:09:08
问题 This is my JSON output from awscli I want to get xxxxxxxx.cloudfront.net using Origin DomainName example1.com with AWS cli query only. { I know this filtering with jq, awk and cut, grep }. "DistributionList": { "Items": [ { "WebACLId": "", "Origins": { "Items": [ { "OriginPath": "", "CustomOriginConfig": { "OriginProtocolPolicy": "http-only", "HTTPPort": 80, "HTTPSPort": 443 }, "Id": "DNS for Media Delivery", "DomainName": "example1.com" } ], "Quantity": 1 }, "DomainName": "xxxxxxxx

How can I use AWS CloudFront and API Gateway side by side for the same domain?

南楼画角 提交于 2019-12-07 17:38:44
问题 I'm putting that static assets of my website on S3, and setting up CloudFront to distribute them. These essentially holds the content users would need for any GET request on my site, to existing paths that is, with a catchall for errors. I also have some POST requests I need to handle. Form submissions, sending emails, notifications, interacting with the database. How can I set up Lambda (or API Gateway) side by side with CloudFront for the same domain so that CloudFront handles GET requests,

S3 static hosting - path without index.html [duplicate]

放肆的年华 提交于 2019-12-07 16:36:33
问题 This question already has an answer here : Setting index document on S3 website with custom domain (1 answer) Closed last year . We have multiple Angular projects which we like to quickly upload to s3 for QA & testing. We upload all of them to the same bucket, in different subfolders. So the s3 bucket structure is as following: -- tests-bucket -- project1 -- index.html -- project2 -- index.html We then have a cloud front distribution and route53 setup e.g. tests.domain.com. When accessing the

Upload content to S3 through CloudFront

。_饼干妹妹 提交于 2019-12-07 12:20:56
问题 I'm working on an app which requires to upload images to S3. Now I am doing like this: S3PutObjectRequest *por = [[S3PutObjectRequest alloc] initWithKey:nameOfThePicture inBucket:nameOfTheBucket]; por.contentType = @"image/jpg"; por.data = imageData; // Put the image data into the specified s3 bucket and object. S3PutObjectResponse *putObjectResponse = [self.s3 putObject:por]; por.delegate = self; Uploading an image directly to S3 is too slow and I have configured the CloudFront service. Now,

Cloudfront rewrite url to S3

橙三吉。 提交于 2019-12-07 11:55:27
问题 I have a Cloudfront domain that servers images from S3 in the form: http://static.example.com/images/image1.jpg -> S3://mybucket/images/image1.jpg I need to do a rewrite, so this url works as well: http://static.example.com/this-is-example/images/image1.jpg -> S3://mybucket/images/image1.jpg It's possible to do this with cloudfront or another amazon service ? Thanks 回答1: Since you are serving out of S3, the best/easiest thing to do is to use S3 Routing Rules . Here's an example that should

AWS GET request with body rejected by CloudFront

久未见 提交于 2019-12-07 10:26:52
问题 I'm build an API using AWS SAM (Lambda & API Gateway) whose contract is defined by a 3rd party. The 3rd party calls my API with a GET request that contains JSON in the body. However, when a request is sent to the API with a body it gets rejected by CloudFront. This is the request: curl -X GET -H "Content-Type: application/json" --data '{"hello":"world"}' https://my-api.execute-api.us-east-2.amazonaws.com/Prod/my-api This is the response: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01