Questions tagged [amazon-cloudfront]

Amazon CloudFront is a web service for content delivery. It integrates with other Amazon Web Services to give developers and businesses an easy way to distribute content to end users with low latency, high data transfer speeds, and no commitments.

0
votes
1answer
11 views

Creating proxy_pass from s3 static web server bucket to instance docket

I'm trying to load our current application to CloudFront-s3 static web site architecture. after creating s3 bucket and CloudFront which work, I'm trying to configure our backend to go to a specific ...
0
votes
0answers
27 views

Serving gzip and br files from cloudfront and s3

S3 + Cloudfromt is not serving .gz /.br static file when client request header contains Accept-Encoding: gxip, deflate, br. Compressed file at build time and s3 folder contains index.html, index....
0
votes
0answers
24 views

CORS, S3 and CloudFront configuration

Whenever I try to POST a file to my S3 bucket, I get the following error message: POST https://api.*.com/sermon 413 Access to XMLHttpRequest at 'https://api*.com/sermon' from origin 'https://*.com' ...
1
vote
2answers
34 views

Multiple region deployment with Geolocation based policy v/s Cloudfront

I have a custom origin i.e. a web app on an EC2 instance. How do I decide whether I should go for: a Cloudfront CDN or, deploy multiple instances in different regions and configure a Geolocation/...
0
votes
1answer
19 views

How to programmaticly get 'distribution-id' to invalidate cloudfront cache?

Need to programmatically get the CDN_DISTRIBUTION_ID so that CloudFront caches can be invalidated post-build regardless of distribution. I've got cloudfront to invalidate as intended but it requires ...
1
vote
0answers
23 views

CloudFront usage in Unity3d

Searching for use examples of CloudFront in Unity and can't find it. Can I use stream video from CloudFront in Unity3d?
0
votes
0answers
21 views

Amazon Cloudfront being being translated to wrong url

I am hosting websites from one server, say example.com and blog.example.com. Server is using Apache 1, its httpd conf by default points to example.com it also contains a virtual host that points to ...
0
votes
0answers
19 views

Getting 401 Unauthorized response when calling thru CloudFront endpoint

We have a setup wherein we put CloudFront in front of our Backend API (proxy). All endpoints were ALMOST successful. POST requests went okay however, GET requests didn't. - Calling the proxy: ...
0
votes
0answers
17 views

How to handle ClodFront redirects with Lamda edge function

Is it better to use 302 status and redirect header or Internally call the the target URL and return the result? I have to write a lamda function to handle CloudFront redirect to a different URL. I ...
0
votes
1answer
46 views

Get Host Public IP through Header in Python

I have a service host on Amazon ECS. It also have load balancer and CloudFront in front of my ECS, below picture is their architecture: When my service is running, it will need it's own public IP ...
0
votes
1answer
24 views

possibility to use S3 as CDN for internal Application load balancer ( ALB) applications

For public websites, we have an option cloudfront as CDN for static content when we use internet-facing application load balancers. Is there any similar option for internal websites using private ALB ...
0
votes
1answer
64 views

How to set Cache-Control Header in amazon cloudfront?

I have a amazon cloudfront distribution that creates a 'origin' to my CDN. In my behavior, I set the Max TTL, Min TTL and default TTL. But my response header does't return the Cache-control header in ...
0
votes
1answer
30 views

Restrict direct API Gateway calls unless it's from CloudFront

We created a CloudFront in front of our APIs. Is it possible to restrict API calls other than coming from CloudFront? Current setup: Caller --> API Gateway Endpoint --> Lambda Caller --> CloudFront ...
1
vote
1answer
29 views

CloudFront Origin Basic Authorization

My origin server is password-protected. I need CloudFront to authenticate with it and cache the contents of my site. This is basic authorization. I've set the Authorization header by going into ...
0
votes
1answer
26 views

aws_cloudfront_distribution.s3_distribution: error creating CloudFront Distribution: AccessDenied:

I am getting below error message when I try to create aws cloudfront using terraform. This is for just practice purpose.. AWS error message * aws_cloudfront_distribution.s3_distribution: error ...
0
votes
1answer
25 views

Create CloudFront distribution that accepts only signed URL’s with serverless

I want to create a web cloudFront distribution that can be accessed only using signed URL's. On creating the distribution manually, there is an option Restrict Viewer Access under the Default Cache ...
0
votes
1answer
24 views

How to manage a large number of images in a Rails app?

I have to manage around 200 high quality images in my app. I am currently using Cloudinary to store these images. But I've seen that many of apps uses a different domain name to store images and ...
1
vote
1answer
46 views

Shall I put aws cloudfront in front of ELB?

I've attached my architecture as shown as above. For HA, I've put ELB in front of my three API ECS instances. For security purpose (as geo restriction and so on), I want to add Cloudfront in front of ...
0
votes
1answer
22 views

ELB and Cloudfront API parameters being ignored

I have two endpoints on my Elastic Beanstalk application: Cloudfront API Link 1 ELB API Link 2 First of which I've set up Cloudfront and linked to my URL. The second is where my Elastic Beanstalk ...
0
votes
0answers
18 views

Cache Control Metadata Not working for files in aws s3

I have a website hosted on aws s3 and cloudfront. I tested my website on GTmetrix and my website got 16 points for Leverage browsing cache. So aws docs suggested to specify the Cache Control or ...
0
votes
2answers
26 views

Access Denied for the signed URL .NET CloudFront

I'm trying to set up a cloudfront for my s3 bucket that will only allow users to read or write with the signed URLs.(read the file, upload, and download) The S3 doesn't have public read/write ...
0
votes
0answers
23 views

S3 Bucket non-encrypted HLS works, but CloudFront of it doesn’t

As the title says. S3 Bucket non-encrypted HLS works, but CloudFront of it doesn’t. I have been trying to get it to work for hours without any success. I followed all the docs closely. I set up header ...
0
votes
0answers
32 views

How can I preserve line breaks in PEM file, using NodeJS to pull it into my application?

Using NodeJS, I am pulling a PEM file into my application. The file lives in AWS S3 and in my local environment. When I run the application locally, all is well. But, when I run it on EC2, I get the ...
0
votes
1answer
21 views

Request headers with S3 static website hosting React app with CloudFront

I have a React app deployed to S3 with a CloudFront distribution on top of it for a specific domain CNAME. I want to be able to create a second CloudFront distribution for a separate, different domain ...
0
votes
0answers
9 views

Redirect from example.com/login to example.com/login.html using AWS CloudFront without separate files in s3?

I don't want to use the .html file extension in my URLs but dropping them resulted in a 404. For this example, I created a new file in s3 called login and then added a MetaData tag Website-Redirect-...
0
votes
1answer
24 views

subdomain pointing to aws public hosted zones in google domains

I have created .dev domain on google domains and want to point various subdomains to aws route53 hosted zones. AWS NS records for aws route 53 hosted zone Basically what I want to do is subdomain1....
0
votes
1answer
33 views

How to configure Service Worker with React to prevent Uncaught Syntax Error on new deployments at AWS CloudFront

I've been reading SO posts and Github issues for the past few days on this topic and I still can't seem to find a combination that works for my setup. Hoping that someone can point me to a specific ...
0
votes
1answer
23 views

Unable to serve static file using cloud front with the origin server as ec2 instance

I have a web application running on centos ec2 instance behind Nginx reverse proxy with SSL certification (Let's Encrypt). I have a javascript file located at the URL for example https://example.com/...
0
votes
1answer
42 views

How to get past CloudFront cached redirect and hit API Gateway instead?

I have a CloudFront distribution set up so that <domain>/api redirects me to <api-gateway-url>/<env>/api. However I find that sometimes CloudFront caches responses to GET requests ...
2
votes
2answers
168 views

How do I return a json file from s3 to a specific url, but only that url

I have a special URL that has been set somewhere else and CANNOT be changed. mydomain.com/discountCards I need to return a JSON, from my s3 bucket whenever a server sends a fetch call to mydomain....
2
votes
3answers
67 views

Django Zappa generated cloudfront generates 403 error

I run a Django project deployed on AWS lambda using serverless Zappa framework. This can be accessed by a randomly generated link from AWS API Gateway lets say:- randomly-generated-link.aws.amazon....
0
votes
1answer
42 views

Lambda@Edge Cache-Control header not present Cloudfront

I've images stored on S3 and a lambda function to resize them on the fly. While doing it I add CacheControl: 'max-age=31536000' to the resized images and also add a Cache-Control header: .then(buffer ...
0
votes
0answers
12 views

How to force cloudfront to cache only every 5 seconds instead of 24 hours for dynamic content

My desired behavior is to have cloudfront cache my origin(api endpoint that returns json). It seems like no matter what values I put in the header for max-age at my origin or what "ttl" values I put ...
0
votes
1answer
32 views

How to add new origins to an already existing cloudfront distribution through cloudformation?

I am trying to add an origin to my already existing Cloudfront distribution(created outside of Cloudformation). Looking at the AWS::CloudFront::DistributionOrigin block in the AWS docs, I could not ...
0
votes
0answers
34 views

Is it possible to make Get Requests with Body through Regional API Gateways and Cloudfront?

When I published and API to AWS with Visual Studio I was getting a 403 error in the response when I called Get methods that contain a Body and according to the answer of @James Dean here: Are Get ...
2
votes
0answers
27 views

CloudFront doesn't fetch from custom origin for root url using Lambda@Edge

I have a Lambda@Edge function that decides which origin to use on the origin request, depending on a header value. It doesn't work for the root url (mysite.com), but it works for subroutes (mysite....
0
votes
1answer
28 views

Aws Php SDk - Create Cloudfront distribution using hard-coded credentials

I'm trying to create a cloudfront distribution while doing the authentication via hardcoded credentials. However i receive this error when i run my code Fatal error: Uncaught Aws\Exception\...
0
votes
2answers
30 views

How do CDN's speed up dynamic content [closed]

According to https://aws.amazon.com/cloudfront/dynamic-content/ Amazon makes the following claim If you are serving dynamic content such as web applications or APIs directly from an Amazon ...
0
votes
0answers
13 views

iOS/Safari audio streams not working. It waits to download the file from Cloudfront / S3

in a native application, made with Flutter, when I try to play an audio file stored on Amazon S3 and served by Cloudfront it works great on Android but on iOS there is a big initial lag. It seems like ...
0
votes
1answer
33 views

Suspect loadByUsername call on AWS

I have Spring Boot application deployed on ElasticBeanstalk. I'm about to start beta tests, so there are no so many people that know application url yet. Yesterday I found out in log file that someone ...
0
votes
1answer
17 views

Configuring Different Error Pages for different origins for the same Cloudfront distributions

We created a cloudfront distribution with 2 origins (1 s3 origin and 1 custom origin). We want the errors(5xx/4xx) from the custom origin to reach the client/user without modification but the error ...
0
votes
0answers
11 views

Very slow download using Cloudfront for cache misses from S3 bucket in ap-southeast-2?

I am randomly seeing very slow cache misses from my s3 bucket which is located in ap-southeast-2. I am storing mpeg-dash segments in the S3 bucket and saving them via cloudfront. My segment files are ...
0
votes
1answer
35 views

Import asset from CDN into Gatsby on page build

I want to import an asset (video) from a CDN (AWS CloudFront) into a specific page in Gatsby. I don't know how to do this. I've tried adding an import statement at the top of the page that references ...
0
votes
1answer
29 views

AWS Cloudfront distribution staying “in Progress” for 55 minutes and counting

I updated S3 objects and then update Distribution (caching related) settings. That was 56 minutes ago. The updated distribution is still In Progress. The total size of S3 objects is 21Mb. How come it ...
1
vote
1answer
18 views

AWS Cloudfront: can I add different servers with different domains under only one distribution to save costs?

I want to use one CloudFront distribution in front of: mydomain.com --> points to a load balancer (website 1) blog.mydomain.com --> points to another load balancer (website 2) api.mydomain.com --> ...
0
votes
1answer
25 views

Where can I set TLSv1.2 for web distribution?

according to the official documentation (https://aws.amazon.com/it/blogs/aws/cloudfront-update-https-tls-v1-1v1-2-to-the-origin-addmodify-headers/) I should be able to set the TLS version by going to ...
0
votes
2answers
24 views

Automatically Clean Up CloudFront Distributions after Disabling

I am currently building a serverless application based in AWS Lambda that creates CloudFront distributions on behalf of users. Currently, when a user calls my 'delete' operation, my API Lambda ...
1
vote
0answers
40 views

How To Authenticate an AirPlay Session

I am serving HLS video with AWS CloudFront. The content is secured with Signed Cookies. I would like users to be able to use Apple AirPlay to watch the video on AirPlay devices. An authenticated ...
0
votes
1answer
34 views

Detect browser version with AWS Lambda

I'm serving a static website on S3 through CloudFront. It's possible to trigger a lambda function each time CloudFront serves a file (Lambda@Edge). This example shows how a Lambda@Edge nodejs ...
0
votes
1answer
35 views

Is it better to locate CloudFront in front of ALB regardless of content type a user access?

I want to build a web/application server in AWS and I want to use CloudFront to deliver content with low latency and ALB to balance traffic between servers. If there are some contents needed to be ...

http://mssss.yulina-kosm.ru