amazon-cloudfront

Why are two requests with different clients from the same computer cache misses on cloudfront?

旧城冷巷雨未停 提交于 2019-12-07 08:35:27
My website uses cloudfront for its images. If I load a webpage in a browser, and then use curl to request an image on that page, then the request with curl is a cache miss. A subsequent request with curl is a cache hit. example: run this twice: curl --verbose https://d1hvwudqvjuczb.cloudfront.net/assets/landing/splash_dickenko-2199af423f275d0784c1813cbaab5645.jpg` The first time, X-Cache will be "Miss from cloudfront", the second time it will be "Hit from cloudfront". So it seems cloudfront is using some aspect of the request to decide if it should refetch the image or not. What could this

AWS S3 static site with HTTPS and VPN-only access

 ̄綄美尐妖づ 提交于 2019-12-07 08:22:10
问题 Currently we have a static site deployed to ECS (Elastic Container Service) and fronted by an ELB (Elastic Load Balancer). This model doesn't really make sense, since the container is just running NGINX to serve static assets. However, what we do get from this model, is VPN-only access to the website (our VPN client forwards all 10.x traffic to our VPC), and an HTTPS listener on the ELB, which are both things that we want to keep. What's the best way to migrate this static site currently

Migrating s3 download to CloudFront from iOS / Android app

泄露秘密 提交于 2019-12-07 08:20:24
问题 We have iOS and Android apps that download files for s3. Since we have worldwide customers, so we would like to migrate to CloudFront. I understand that in order to do that, I need to construct a url from / and send NSURLRequest. This means I am no longer using the dedicated S3GetObjectRequest to get an object from bucket. I wonder if it's the only way to do it, or there's a way to work with s3 classes with cloudFront? this is my code (iOS): - (int) request:(NSString*)request response:(NSData

Confused about streaming video in HTML5

白昼怎懂夜的黑 提交于 2019-12-07 03:49:25
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? If you are delivering an mp4 then "instantly" may always have some delay - the client needs to download enough of

Adding a URL parameter (?p=234) to a file on Amazon Cloudfront doesn't force a refresh of the file [closed]

落花浮王杯 提交于 2019-12-07 03:09:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I have JS and CSS files being served through Amazon Cloudfront. Up until now I was using my own server running Varnish, and when I updated any JS or CSS file or I had to do to use that new version was to increase a counter on a URL param on the request for that file. So the URL of the file being included would

How to clear Amazon CloudFront Cache completely?

拈花ヽ惹草 提交于 2019-12-06 17:00:48
问题 I made some changes to my origin server which now serves different data from same url. I tried to clear my cache completely by doing the following invalidation in CF UI: But this didn't work. How can I wipe off completely the Amazon CloudFront cache's in one go? 回答1: CloudFront does now support wildcard or full distribution invalidation. You will need do do one of the followng. Invalidate each object that has changed Invalidate /* Version your objects so that they are considered new (Ie

Custom domain for API Gateway returning 403

时光毁灭记忆、已成空白 提交于 2019-12-06 16:51:07
问题 I am creating an api using API Gateway and Lambda. Using the url designated in the API Gateway Stage editor everything works fine; however, when I try and move to a custom domain I am running into some issues. The first thing I tried was using a CNAME record in Route 53 straight from my domain onto the domain that I got from the API Gateway. That was returning some errors and I think it is the incorrect solution is that correct? Next I tried the Custom Domain Names feature in API Gateway. My

Amazon EC2: load balancing / way to sync files / EC2 + CF

倾然丶 夕夏残阳落幕 提交于 2019-12-06 15:45:24
问题 As I understand I can use EC2 as web server for my application. But how load balancer is working? For example I have one EC2 instance. In this way load balancer will not work. Am I right? For example I have few EC2 instances. In this way I can configure load balancer to balance between all my EC2 servers. Am I right? Application files at all instances should be synced? Is there is any Amazon tool to sync? Or I should use something like rsync or post commit hooks to sync files between EC2

Cloudfront and CSS/JS assets

99封情书 提交于 2019-12-06 13:32:24
I have a cloudfront distribution set up to go to myapp.herokuapp.com Maybe I've misunderstood Cloudfront and CDNs in general, but I thought that somehow the CDN hosted the static files instead of me just including references to the CDN URL in my HTML files stored on Heroku. What I'm seeing in my Chrome Network tab is: Request URL: http://blah123.cloudfront.net/css/style-123.css Request Method:GET Status Code:301 Moved Permanently then: Request URL: http://myapp.herokuapp.com/css/style-123.css Request Method:GET Status Code:304 Not Modified Is there another way to set up Cloudfront so that the

Get CloudFront custom domain in the headers of a request

大城市里の小女人 提交于 2019-12-06 12:44:01
I have a CloudFront distribution abcd1234.cloudfront.net and I've added a custom domain of mysite.com to the distribution. The CloudFront distribution's origin: aaabbbccc.execute-api.us-east-1.amazonaws.com When I load the page mysite.com/hello/world , CloudFront is then consuming API Gateway aaabbbccc.execute-api.us-east-1.amazonaws.com/prod/{proxy+} the API Gateway path endpoint is invoking a Lambda Function that calls a function like getPageContent(customDomainName, pagePath) which should be mysite.com and /hello/world respectively. However, inside that function, the Host header that