Questions tagged [amazon-cloudfront]

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

Filter by
Sorted by
Tagged with
4 votes
2 answers
7k views

How to whitelist Authorization header in CloudFront custom Origin Request Policy?

I have created the following CloudFront Origin Request Policy: I need Authorization header (without Authorization header the AntiForgeryToken header is not forwarded) but I do not understand why ...
6 votes
1 answer
4k views

AWS: How to redirect many domains to a page on another domain?

My objective I have a number of domains (e.g. 10 or 20) and I would like to redirect any visitors to anywhere on those pages to one page on another domain (for example my stackoverflow.com profile ...
0 votes
1 answer
193 views

Cloudfront distribution with react app and wordpress app hosted on same domain - how to get browsers with react app cached to render wordpress app?

I have a domain that hosts a react website in an s3 bucket via cloudfront. There is also a wordpress site hosted on a subdomain of that domain, and in the cloudfront distribution for the web app, I ...
1 vote
1 answer
2k views

AWS Cloudfront CORS trouble with font files

I have a Javascript application that is delivered to the browser from a CloudFront endpoint. All static files of the application are hosted in an S3 bucket. That involves a whole bunch of javascript ...
1 vote
2 answers
2k views

On AWS, is it possible to have CloudFront proxy requests to API Gateway while maintaining the request's query string?

I have a CloudFront distribution configured with multiple Origins, including an API Gateway deployment. I'm trying to create a Behavior on CloudFront so that any requests received to a /api/* path ...
1 vote
0 answers
159 views

React Js + AWS Cloudfront + SaaS + SSL Certificates

This is the scenario I have in mind SaaS application Frontend built using React Js Hosted using S3 bucket + Cloudfront Customer domains pointing to this application using CNAME Questions - Can ...
0 votes
0 answers
335 views

Transfer Compression with Cloudfront and nginx SSI

Is there any way to enable GZIP / Brotli compression on Cloudfront if the origin is a nginx server with SSI (Server Side Includes) enabled? The issue seems that nginx SSI drops the Content-Length ...
0 votes
1 answer
2k views

redirect non www to www for static website hosting using cloudfront

I have searched almost everywhere on how to redirect with cloudfront. I created an s3 bucket for static website hosting and even used their redirect there BUT because i am not serving whole website ...
1 vote
2 answers
3k views

Whole-site delivery on CloudFront

After much searching, I can't seem to find the question to whether it's viable to cache my entire website in Cloudfront. (Static assets as well as the HTML returned on a dynamic request). The Setup ...
0 votes
2 answers
4k views

Cloudfront for TLS Termination?

I was looking for a cheap AWS service that would terminate TLS and also take care of signing an Amazon certificate for an internal application. I found that I can use Cloudfront with a custom origin ...
0 votes
1 answer
843 views

Connect AWS SSL certificate to Intercom Articles

We have our support articles in Intercom Articles and need to attach a SSL certificate to the subdomain support.packaly.com. Intercom does not offer its own certificate so we need to do it through AWS....
0 votes
1 answer
332 views

Will using reverse proxy negate the effect of CDN?

Goal: Serve a specific sub directory of a domain from a different CDN (cloudfront in our case). We are thinking of utilizing Nginx as a reverse proxy to achieve this. For example, the following ...
0 votes
0 answers
400 views

Do CNAME mapping of my subdomain to Sendgrid for link branding using Amazon Cloudfront CDN

I want to have link branding with SSL on my domain example.com, so I created sub-domain abc.example.com, I want this abc.example.com to CNAME to sendgrid.net. I have done CNAME mapping but it seems ...
1 vote
1 answer
726 views

CloudFront "Compress Objects Automatically" and REST API

I have a cloudfront distribution in front of a REST API server. Just for now, I need to disable cache, so I'm using the Managed-CachingDisabled policy. I can't get any responses to return as gzipped. ...
2 votes
1 answer
3k views

AWS Cloud Front, how to request origin using correct url

I'm trying to cache a website that is on an EC2, it has an URL uncached.xyz.com, so i created an Cloud Front with the origin pointed to uncached.xyz.com and created a record xyz.com that points to the ...
0 votes
1 answer
2k views

Why CloudFront-Viewer-City is always null?

I have created a CloudFront distribution just for testing purposes. Why is CloudFront-Viewer-Country passed to the origin but CloudFront-Viewer-City is not? Settings I believe these are the two ...
2 votes
0 answers
278 views

Why is CloudFront ApiGateway CloudFront-Viewer-Country reporting US as the country for eu-west-1 distribution and viewer in UK?

I have an AWS CloudFront distribution created using CDK (CloudFrontWebDistribution) fronting an ApiGateway, deployed in eu-west-1 (Dublin). I can see in the API logs that the CloudFront-Viewer-Country ...
1 vote
1 answer
1k views

Unable to access S3 static website using https

I have followed all the steps from https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-https-requests-s3/ but my website still cannot be accessed using https. My certificate was issued ...
-1 votes
1 answer
125 views

Suggestions for AWS setup wanted

For my next project, I'm giving AWS and server-less a go, but I'm not sure how to reason about the different AWS services. So here's hoping that someone here has a good feel for it. The project ...
1 vote
0 answers
193 views

Configure AWS CloudFront to add a default metadata param to the uploaded files

I need to have the Content-Disposition = “attachment” set to all files uploaded to the s3 bucket. How do I configure CloudFront to create this param and added it to metadata ? I configured the ...
0 votes
1 answer
536 views

Cloudfront SSL with Subdomain pointing to S3 bucket works, but still redirects to S3 URL

I've set up an S3 Bucket that I want to use as a CDN but with my own subdomain. For example, myfiles.mydomain.com. So, I set up a Cloudfront web distribution that points to the bucket named "...
0 votes
1 answer
1k views

Serving a React app with s3 and Cloudfront

I'm wondering if this is feasible. I'm thinking about serving a React app using s3 and Cloudfront. Some of the routes are prerendered, and can be served as static index.html files. Other routes, on ...
0 votes
0 answers
1k views

How to check AWS cloudfront traffic limit? 504 server error

I have a website that handles ticket selling which opens once a year. Many peoples come to the website at a specific date and time. However, some users received 504 Status Code (Gateway Timeout) from ...
0 votes
1 answer
1k views

Preserve Cloudfront brotli compression through a nginx reverse_proxy

My question is similar to Nginx reverse-proxy to a cloudfront distribution and preserve gzip compression but especially regarding the new brotli compression algorithm that is supposed to perform ...
0 votes
1 answer
301 views

Setting up a multi CDN with cloudfront based on location

I am in a bit of a specific situation with what I am trying to achieve Right now I host on cn-north-1 with a CloudFront distribution. I have a Route53 CNAME setup pointing to this distribution on ...
0 votes
1 answer
1k views

Nginx proxy_pass multiple redirects issues

I'm having issues with nginx and 302 redirects to files that are behind multiple redirects. so I'm trying to proxy this request and get 502 bad gateway. location /85319 { proxy_pass https://traffic....
1 vote
2 answers
6k views

Passing User-Agent through Cloudfront for Facebook scraper

This question is borderline stackoverflow/serverfault, so don't hold it against me that it's here please :) I have a service hosted on AWS, nginx with node.js behind it. I have a cloudfront ...
0 votes
1 answer
5k views

Filter to only pass specific headers by Nginx reverse proxy

For example here is a list of headers set by the frontend project and send all by default * accept: application/json * accept-encoding: gzip, deflate, br * accept-language: en-GB,en-US;q=0.9,en; * ...
0 votes
0 answers
328 views

How can I allow users to map their own domain to a subdomain on my Cloudfront site?

So I run a service where a user can create a site and they get their own subdomain. So if a user has site a-site-name their subdomain will be a-site-name.domain.com. Some of the users want to be able ...
1 vote
1 answer
832 views

Accessing photos from AWS CloudFront

I have an S3 bucket called my-bucket. There is a folder inside my-bucket called uploaded-photos. I can access the photos inside this bucket using the following URL: http://my-bucket.s3-ap-southeast-2....
0 votes
1 answer
84 views

mod_authz_basic and CloudFront (was: mod_authz basic Directory vs. Location with vhosts)

I'm having a problem with using Apache basic authentication. I have a single EC2 server sitting behind an AWS elastic load balancer and CloudFront. I run several domains on the machine. I use Apache ...
1 vote
1 answer
1k views

CloudFront what to use for Origin Domain Name when connecting to Wordpress

I have a Wordpress site set up at site.example.com and I am trying to configure a CloudFront distribution as a reverse-proxy to reduce the load to my origin server. In the past I have used CloudFlare ...
2 votes
1 answer
1k views

Redirect apex domain to www with Route53 and CloudFront

I'm trying to setup redirect from the apex domain example.com to www.example.com with route53, cloudfront and s3. I've seen many tutorials online and discussions here on the topic, but nothing has ...
1 vote
0 answers
153 views

How does Origin Protocol Policy overlap with Viewer Protocol Policy?

The question is about Amazon CloudFront. The names in the title refer to two types of settings. The former can be edited via the "Origins and Origin Groups" tab, while the latter via the &...
0 votes
2 answers
1k views

Using Cloudfront as a HAProxy backend server using https

I have a CloudFront resource sitting in front of my S3 bucket. It's accessible at — https://<id>.cloudfront.net but if I hit — <id>.cloudfront.net:443 I get a 400 Bad Request. I want to ...
0 votes
1 answer
286 views

Cloudfront behaviors with S3, Wordpress backend, and Vue frontend

I'll try to explain my situation and issue as best as I can. Previously I had a wordpress site behind cloudfront. Set up behaviors and that all worked well. Recently I have moved to using my wordpress ...
0 votes
1 answer
255 views

Second identitcal CloudFront distribution error: CNAMEAlreadyExists

I'm migrating my static website from one AWS account to another. I want to have zero downtime and decided to pull up the whole infrastructure on the second, then just switch the domain name's DNS ...
1 vote
1 answer
639 views

Trying to revoke public access on CloudFront S3 bucket

All the AWS security tools are bugging me all day about having public S3 bucket access turned on. So I said sure, the only bucket we have that needs public access is our cloudfront bucket, let me fix ...
6 votes
1 answer
12k views

I get a 403 when requesting a JS file from CloudFront

This is new to me so please excuse me if I have no idea what I'm talking about (: I'm trying to set up my own CDN with CloudFront and S3 through a subdomain by adding a CNAME to that subdomain to ...
0 votes
0 answers
122 views

Amazon Cloudfront - Increase data transfer speed like tiktok

I have been trying to setup CDN using Amazon Cloud front. All configurations are done. But when I compare it with tiktok's CDN, tiktok's CDN is able to transfer 3.2 MB file in just 300 miliseconds. ...
0 votes
1 answer
182 views

CloudFront distribution from S3 bucket: big "bucket is public" warning. What can go wrong?

I'm moving an existing static website to S3/CloudFront. Following some documentation from AWS, I setup a policy on the S3 bucket to make it public: { "Version": "2012-10-17", "Statement": [ ...
2 votes
0 answers
2k views

Access denied for S3 bucket with redirect access via CloudFront

I have public S3 bucket exposed via CloudFront to S3 A record for www.mezinamiridici.cz. https://www.mezinamiridici.cz/ - works http://www.mezinamiridici.cz/ - redirects to https://www.mezinamiridici....
2 votes
1 answer
5k views

CloudFront - Forward all query strings, cache based on none - possible?

Background I have an EC2 instance serving Websocket connections, with CloudFront over the top. Now I am serving dynamic content that cannot be cached within CloudFront so I've effectively disabled ...
4 votes
0 answers
5k views

Overriding AWS ALB's default error page(s) with custom one(s) using CloudFront

I have an ALB, containing Rules that forward requests to my private EC2s, hosted on AWS, and when I make a new deployment, I have a script in Lambda that turns off my ASGs and turns them back on. ...
0 votes
1 answer
4k views

AWS CloudFront gives 403 error when acessing from registered domain

I have a static website hosted on S3 distributed by CloudFront. If I reach the website through the CloudFront domain (d3agx9libnsfm1.cloudfront.net) it works. But when I try to reach the website ...
1 vote
1 answer
300 views

Serving secure static S3 site without www

I'm trying to set up AWS to serve a static S3 site over SSL with a custom domain. I'm so close but I'm missing one piece. S3 static website (works): xyz.s3-website.us-east-2.amazonaws.com CloudFront ...
1 vote
1 answer
3k views

how to make a ecs web service task definition public on the internet

I have created an ECS Cluster, an AWS ECS service with 1 ECS task definition that has a container that points to this simple docker image which is the Nginx hello image just for testing. I now want ...
2 votes
1 answer
4k views

Cloudfront infront of ELB and kubernetes is showing Default backend (nginx-ingress)

Having kubernetes cluster with nginx ingress, pointed to AWS ELB load balancer and Route 53 domain pointed to this ELB is working just fine. Now I am trying to add cloudfront, it's pointing to load ...
1 vote
1 answer
683 views

what should the ACL value be when limiting S3 object access to CloudFront only?

I followed https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html But I cannot figure out what should the ACL on AWS.S3.PutObjectRequest be ...
0 votes
3 answers
4k views

Getting cloudfront logs into logstash: ERROR: is not a legal argument to this wrapper, cause it doesn't respond to "read"

Logstash version 1.5.0.1 I am trying to use the logstash s3 input plugin to download cloudfront logs and the cloudfront codec plugin to filter the stream. I installed the cloudfront codec with bin/...

1 2
3
4 5
9