Questions tagged [amazon-cloudfront]

Amazon CloudFront is a content delivery network (CDN) offered by Amazon Web Services.

Amazon CloudFront is a content delivery network (CDN) offered by Amazon Web Services.

Official page

398 questions
9
votes
1 answer

Is it possible to avoid costs for invalid requests at AWS S3 or cloudfront during a DDoS attack?

There are many tutorials in the internet, that promote cheap hosting of static websites via AWS S3 + AWS Cloudfront (+ Cloudflare). Example of these would be: Host a website using S3, CloudFront and CloudFlare How to host a website on S3? I was…
9
votes
4 answers

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

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…
9
votes
2 answers

AWS Cloudfront multiple origins - how can we fallback to 2nd origin if not found in the 1st

We're trying to set up a Cloudfront distribution where the default origin is S3, but if the content is not found on S3, we want it to fetch it from an EC2 instance. Can we setup these multiple origins: S3 and EC2 and two behaviors, both defaulting…
adoram
  • 91
  • 1
  • 3
9
votes
2 answers

OPTIONS request to CloudFront distribution with managed CORS-With-Preflight policy returns 403

I have a CloudFront distribution with a default behavior that is configured to allow any CORS request including preflight requests. However, the OPTIONS request will fail with an HTTP 403 error (details below) which is not what I expect. I am using…
aaronk6
  • 416
  • 6
  • 14
8
votes
2 answers

CloudFront S3 Access denied

I have one account with privilege to manage S3 (S3_User), and another one to manage Cloud Front (Cloud_Front_User). Now, I've created a bucket "bucketname" with S3_User and a distribution with Cloud_Front_User with origin my S3 Bucket. When I tried…
sparkle
  • 175
  • 1
  • 1
  • 8
8
votes
3 answers

Using EC2 as a Cloudfront Origin Server

Amazon has recently added the ability to use any server as an origin server for Cloudfront, removing the original S3 only restriction. My question is- how do I set this up? The AWS web-gui seems to only support the S3 buckets (still), and the ec2…
chrism2671
  • 2,579
  • 9
  • 34
  • 45
7
votes
1 answer

Is there a need for WAF in static website front with REST API?

I have two webistes www.mysite.com. -->hosted on s3 , served via Cloudfront static single page App. Then I have api.mysite.com , which the front end uses. My company is using WAF solution from thirdparty and current monolith applications are…
7
votes
1 answer

Why is only index.html available from an S3 bucket served by CloudFront, and nothing else?

I am trying to expose a static site hosted in S3 though CloudFront. The S3 bucket (testyop1) is set to host static websites (not in public mode) and its bucket policy is { "Version": "2008-10-17", "Id": "PolicyForCloudFrontPrivateContent", …
WoJ
  • 3,607
  • 9
  • 49
  • 79
7
votes
1 answer

AWS Cloudfront + Load Balancer, url changes from main domain to load balancer subdomain

My setup is as follows: user types example.com on the browser request goes to AWS CloudFront, which redirects HTTP to HTTPS, and forwards the request to the AWS Elastic LoadBalancer (elb.example.com) LoadBalancer forwards the request to the EC2…
7
votes
0 answers

What's the best way to simulate being behind China's Great Firewall?

We're having issues with an iOS app of ours that uses in-app purchase to unlock downloadable content - but it seems only from China. We see many negative reviews from China for this reason. Our in app purchase process involves hitting a https server…
7
votes
3 answers

How to store a Cloudfront custom error page in S3?

I have a Cloudfront plugged on an AWS load balancer. I saw in the AWS documentation that I can customize Cloudfront custom error pages. I tried to store these error pages in S3 as it is recommended in the AWS doc but it doesn't work. The…
jsebfranck
  • 213
  • 1
  • 2
  • 7
7
votes
3 answers

Strict-Transport-Security on CloudFront with S3 origin?

My company's site has a static homepage for speed and cost reasons. We use S3 as the origin for CloudFront. Now, we would like to declare Strict-Transport-Security for the entire domain, but S3 seems to not send any headers we specify (beyond ones…
7
votes
2 answers

Does Amazon CloudFront charge for storage?

I've been reviewing the features and prices of Amazon S3 and Amazon CloudFront as well as similar services offered by other providers. One thing I can't understand is why Amazon CloudFront pricing doesn't seem to have a cost for storage as the other…
user101340
7
votes
2 answers

Static IP for cloudfront

Is there any way to bind static IP to my cloudfront distribution? I'm wondering if VPC can make that work. I need static IP just to eliminate the problem of allowing in my firewall everytime AWS Cloudfront IP changes.
droidlabour
  • 147
  • 1
  • 3
  • 7
7
votes
1 answer

Using Amazon s3 and Cloudfront what is the best way to set expires headers and cache expiration

We have a huge bucket of photos on s3. We add and remove from this daily but it currently has millions of photos that we don't want to rewrite or update if possible. We have not set any expires headers on these existing photos. I just Spun up…
Tom DeMille
  • 239
  • 3
  • 8
1
2
3
26 27