amazon-cloudfront

Intermittent Cloudfront CDN failures (monitoring) - CDN Failover

最后都变了- 提交于 2019-12-23 16:50:26
问题 For the past 2 months I have been experiencing Amazon Cloudfront intermittent failures (2-3 times a week) whereby the page would load from my web server but all the assets from the CDN would block in pending for minutes at the time (I confirmed that with shell curl from different datacenters some work some don't depending on the edge location - London?). Once the pending requests succeed all goes back to normal. We have been reporting this to amazon but they always reply with "Don't expect

Dynamically choose an S3 object to be served by CloudFront

醉酒当歌 提交于 2019-12-23 15:39:33
问题 Is it possible to have a custom origin server tell CloudFront to directly serve a file from an S3 bucket, similar to the way X-Sendfile works in Nginx? I'd like to avoid having to read the file from S3 and pipe it to CloudFront. 回答1: No, this isn't possible. Once the request is sent from CloudFront to the origin server, the only thing CloudFront will do (unless an error occurs, of course) is return the origin server's response to the requester. The only way that comes to mind in which this

Access Denied when creating CloudFront invalidation with AWS CLI

Deadly 提交于 2019-12-23 12:16:41
问题 I'm using the AWS CLI to create a CloudFront distribution in a script: aws configure set preview.cloudfront true aws cloudfront create-invalidation --distribution-id ABCD1234 --paths '/*' I have a policy set up with this statement: { "Sid": "xxx", "Effect": "Allow", "Action": [ "cloudfront:CreateInvalidation" ], "Resource": [ "arn:aws:cloudfront::xxx:distribution/ABCD1234" ] } The policy is attached to the user that is running the command. However, I still get this error: A client error

cloudfront cache hits only pricing

浪尽此生 提交于 2019-12-23 05:14:23
问题 lets say i am using aws's s3 connected with cloudfront . And s3 sends one image file of size 1 MB to be cached on all cloudfront's edge nodes. then the cached image file is downloaded 1 million times from cloudfront's edges .(the image is not grabbed again from s3 ). do i pay for 1-the bandwidth for transferring the file from s3 to cloudfront edges. 2- the bandwidth for transferring the file from s3 to cloudfront edges + the bandwidth for 1 million downloads from the cloudfront edges . also ,

Receive AccessDenied when trying to access a reload or refresh or one in new tab in angular 5

随声附和 提交于 2019-12-23 03:52:00
问题 For a while, I was simply storing the contents of my website in a s3 bucket and could access all pages via the full url just fine. I wanted to make my website more secure by adding an SSL so I created a CloudFront Distribution to point to my s3 bucket. The site will load just fine, but if the user tries to refresh the page or if they try to access a page using the full url (i.e., www.example.com/home), they will receive an AccessDenied page. 回答1: S3 doesnt understand route open when you

Does Amazon pass custom headers to origin?

不问归期 提交于 2019-12-22 19:59:42
问题 I am using CloudFront to front requests to our service hosted outside of amazon. The service is protected and we expect an "Authorization" header to be passed by the applications invoking our service. We have tried invoking our service from Cloud Front but looks like the header is getting dropped by cloud front. Hence the service rejects the request and client gets 401 forbidden response. For some static requests, which do not need authorization, we are not getting any error and are getting

Can't access through S3 to files updated through CloudFront

允我心安 提交于 2019-12-22 17:55:54
问题 I was using Cloud-Front to access files in my S3 bucket and update the files. I disable Cloud-Front now, however i cannot access those files directly through S3 now. Also, when i try to set permissions on items in the bucket i receive a message that access was denied. I don't have such problem with items updated directly through S3. How can i enable access to files in my bucket directly though s3? 回答1: I had the same problem: Files created with Origin Access Identity weren't readable by the

How to enable gzip compression on AWS CloudFront

好久不见. 提交于 2019-12-22 13:01:05
问题 I m trying to gzip compress the img I m serving through CloudFront . My origin is S3 Based on several articles/blogs on aws, what I did is: 1) Set "Content-Length" header for the object I want to compress. I set the value equal to the size appeared on the size property box 2) Set the Compress Objects Automatically value to Yes in the Behaviour of my cloud distribution. 3) I invalidated my object to get a fresh copy from S3 . Still I m not able to make CloudFront gzip my object. Any ideas? 回答1

AccessDeniedException while creating AWS Web Cloudfront Distribution

半城伤御伤魂 提交于 2019-12-22 08:30:04
问题 I'm new to AWS and trying to create a Web CloudFront distribution. I chose: Origin media: wp.s3.s3.amazonaws.com Restrict Bucket Access: Yes Origin Access Identity: Create a new identity Grant Read Permissions on Bucket: Yes, Update Bucket Policy I get the following error when I click on Create Distribution: com.amazonaws.services.cloudfront.model.AccessDeniedException: Your account must be verified before you can add new CloudFront resources. To verify your account, please contact AWS

How to forward non WWW to WWW with AWS Amazon Cloud front behind HTTPS cloud front

六眼飞鱼酱① 提交于 2019-12-22 07:50:40
问题 I already have Cloud Front setup to redirect all calls to HTTPS protocol. Now I want to forward "non www" to www. How can I achieve this with respect to the current setup? I tried the one below, but it wasn't successful as this one doesn't take HTTPS redirection into consideration. https://www.pbxdom.com/how-redirect-non-www-to-www-with-amazon-cloud-front-route-53-and-s3 URL doesn't redirect www. Instead, it shows error message: This XML file does not appear to have any style information