amazon-cloudfront

Tell CloudFront to only cache 200 response codes

强颜欢笑 提交于 2019-12-22 05:41:23
问题 Is it possible to configure Amazon CloudFront to only ever cache 200 codes? I want it to never cache 3xx as I want to connect it to an on the fly image processing tool with Lambda that performs a 307 via S3 as described ere https://aws.amazon.com/blogs/compute/resize-images-on-the-fly-with-amazon-s3-aws-lambda-and-amazon-api-gateway/ 回答1: There isn't a way to explicitly tell CloudFront to cache only 2XX's and not cache 3XX's unless you can configure the origin to set the Cache-Control header

CloudFront got X-Cache: Error from cloudfront with Status Code 200

淺唱寂寞╮ 提交于 2019-12-22 04:40:30
问题 I was trying to host my site example.com using CloudFront with two S3 origins. S3-main for the site and S3-resources for the resources. So I set S3-main as the default(*) . And S3-resources with path pattern resources/* . When I go https://example.com I successfully loaded index.html under S3-main But when I tried to GET https://example.com/resorces/something.jpg I got again https://example.com/index.html with header like below: http GET https://example.com/resources/something.jpg HTTP/1.1

CloudFront rate limit rule doesn't work

北战南征 提交于 2019-12-22 04:25:15
问题 I have a CloudFront distribution for an EC2 HTTP server. I created a rate limit for my CloudFront distribution using WAF. In theory no IP address should be able to send more than 2,000 requests in any 5 minute period. But this just doesn't seem to work. I fired off 10,000 concurrent requests from my laptop (using a Go program) in <1 minute and all of them got through. I know they are reaching the EC2 origin because my HTTP server keeps a counter for requests. Strangely, the WAF dashboard even

HTTPS for S3 bucket with redirection

雨燕双飞 提交于 2019-12-22 04:04:56
问题 I have a website on example.com . I have created a S3 bucket and set it up to redirect all requests to example.com and I have created a DNS entry to point www.example.com to that S3 bucket. So far, redirecting from http://www.example.com --> http://example.com works fine I am having trouble redirecting https traffic from https://www.example.com --> https://example.com . I have created a Cloudfront distribution and added SSL to it and pointed it to the S3 bucket mentioned above. When I try to

Cloudfront cache-control headers missing

一曲冷凌霜 提交于 2019-12-22 03:48:43
问题 I setup Cloudfront to serve static images, js, css files for www.lottoresults.ie. I used a custom origin server. The cloudfront domain name I setup is icdn.lottoresults.ie. I set this up using Bind9 dns, with icdn.lottoresults.ie a CNAME for the cloudfront distro. That's all fine. However, for website performance optimization (Yslow, google pagespeed etc), I want to have Cache-control and Expires headers set, and I do not want Etags. To do this, I have the following in my htaccess file for

CloudFront distribution and AWS issued certificate gives SSL_ERROR_NO_CYPHER_OVERLAP

空扰寡人 提交于 2019-12-22 02:05:48
问题 I can't get the Internet <-> CloudFront <-> S3 Bucket working, using an AWS certificate. This is what I did: Created a certificate, a wildcard one, like: *.mydomain.com. Created a S3 bucket, no fiddeling with properties. Creating a CloudFront distribution, using the created S3 bucket URL as origin, selecting my certificate from step 1, choosing HTTP/2, HTTP/1.1, HTTP/1.0, and choosing HTTP to HTTPS redirect. Created an A alias in my hosted zone for the domain the certificate is issued for,

AWS CloudFront SSL Certificate - MalformedCertificate error

亡梦爱人 提交于 2019-12-22 00:01:59
问题 I am facing problem when uploading SSL certificate to AWS IAM for cloundfront. I think that the command is ok and files are OK but still it gives an error. We are using the following command for uploading SSL certificate: aws iam upload-server-certificate --server-certificate-name SSL-CloudFront --certificate-body Public.cer --private-key keyStore.pem --certificate-chain STAR_xxxxxx_com.ca-bundle --path /cloudfront/ICE_SSL/ Error: A client error (MalformedCertificate) occurred when calling

s3 cloudfront app Code: NoSuchKey on refreshing

三世轮回 提交于 2019-12-21 20:12:24
问题 I have my angular2 webapp hosted in s3. it has cloudfront as well. Its connecting to nodejs as backend which is in different machine in AWS EBS. My web application works fine.But when i refresh any page , its throwing 404 Not Found with the below message. Code: NoSuchKey Message: The specified key does not exist. Key: user/adduser/edit RequestId: CA306FFABB30FB75 HostId: WAp7/BZMHH0UpE3z2dJLJT4gqEwv7u/LKbFTUuHH86lRyReLXvODLgTuTw+3emnTJ3jDj2VpiYo= Can you help to resolve this? 回答1: I am not

s3 cloudfront app Code: NoSuchKey on refreshing

自作多情 提交于 2019-12-21 20:10:10
问题 I have my angular2 webapp hosted in s3. it has cloudfront as well. Its connecting to nodejs as backend which is in different machine in AWS EBS. My web application works fine.But when i refresh any page , its throwing 404 Not Found with the below message. Code: NoSuchKey Message: The specified key does not exist. Key: user/adduser/edit RequestId: CA306FFABB30FB75 HostId: WAp7/BZMHH0UpE3z2dJLJT4gqEwv7u/LKbFTUuHH86lRyReLXvODLgTuTw+3emnTJ3jDj2VpiYo= Can you help to resolve this? 回答1: I am not

Hosting multiple S3 origins under one CloudFront distribution

匆匆过客 提交于 2019-12-21 17:42:15
问题 Is it possible to host multiple S3 origins under the same CloudFront distribution? Let's say I have bucket A and bucket B which both host static websites--could I add them both as origins to a distribution, and specify a path e.g. /alternate for the origin from bucket B so that visiting http://<distribution>/ took you to the website hosted by bucket A and visiting http://<distribution>/alternate brought you to the one hosted by bucket B? From what I've read so far it seems possible to have