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.

Docs

4907 questions
23
votes
2 answers

Cloudfront private content + signed urls architecture

Let me start out with a quick introduction to the architecture of a system I'm considering migrating to S3+Cloudfront. We have a number of entities order in a tree. The leaves of the tree has a number of resources (jpg images to be specific),…
23
votes
1 answer

Cloudfront CNAME vs DNS CNAME

I've set up a distribution but I'm a bit confused about the purpose of the CNAME that can be set up in Cloudfront. Assuming my assigned Cloudfront domain is d27fwrff25jcfdafa.cloudfront.net I can assign the "nice" CNAME static.example.com using the…
Paul
  • 655
  • 1
  • 8
  • 19
23
votes
3 answers

CloudFront error when serving over HTTPS using SNI

Amazon recently rolled out a new feature on CloudFront that supports custom SSL certificates at no charge using SNI (Server Name Indication). I got my distribution set up with a free Class 1 certificate from StartSSL and everything was working when…
wikichen
  • 2,253
  • 3
  • 18
  • 28
22
votes
4 answers

AWS Amplify: How to delete the environment, when resources are already partially deleted?

TL;DR: How to delete an amplify environment, when some resources of the service have been deleted manually in the console? So, I took a course on egghead to learn the aws amplify CLI. Unfortunately, it doesn't teach you how to delete the environment…
22
votes
5 answers

Multiple Policy Statements for CloudFront Custom Policy (Signed Cookies)

Is it possible to create a policy with multiple statements when using a CloudFront custom policy for signed cookies (not signed URLs)? I have read the documentation, and although all the examples just have one statement, I cannot see an explicit…
atp
  • 30,132
  • 47
  • 125
  • 187
22
votes
3 answers

Modify HTML Response (Not Headers)

Hoping someone can help me out or point me in the right direction. I've been asked to find out how to make Akamai (or any other CDN, or NGINX) modify the actual response body. Why? I'm to make the CDN change all "http://" requests to "https://"…
Charlie
  • 1,646
  • 5
  • 22
  • 40
21
votes
1 answer

AWS Lambda@Edge not logging

I have viewer-request and origin-response Lambda functions deployed to a CloudFront distribution, which are firing, but not logging to CloudWatch. I have spent a considerable amount of time researching this topic, and have run through all advice…
21
votes
7 answers

How can I prevent Amazon Cloudfront from hotlinking?

I use Amazon Cloudfront to host all my site's images and videos, to serve them faster to my users which are pretty scattered across the globe. I also apply pretty aggressive forward caching to the elements hosted on Cloudfront, setting…
Donald Jenkins
  • 3,485
  • 8
  • 33
  • 35
21
votes
1 answer

Error creating CloudFront Distribution: NoSuchOrigin:

I am trying to deploy a Cloudfront distribution with Terraform and getting an error while specifying the origin_id Cloudfront is pointing at a load balancer via a Route53 lookup. resource "aws_cloudfront_distribution" "my-app" { origin { …
21
votes
4 answers

AWS CloudFront - forward User-Agent but don't cache against it

I want my origin to be able to see the User-Agent header .e.g: Gecko/20100101 Firefox/62.0 not Amazon CloudFront. In the Behaviors tab I can whitelist User-Agent header, so it's passed to the origin correctly, however now CloudFront caches content…
Tom Raganowicz
  • 2,169
  • 5
  • 27
  • 41
21
votes
2 answers

Pointing Amazon's CloudFront at an A record not a CNAME

I've found instructions to point my domain's CNAME to Amazon's CloudFront service but ideally I would like to point the root name (A record name). For example, example.com instead of www.example.com. Is this possible?
git-noob
  • 5,757
  • 11
  • 34
  • 32
21
votes
3 answers

CloudFront: Cost estimate

Have to come up with a proposal to use Amazon S3 with CloudFront as CDN. One of the important thing is to do a cost estimate. I read over AWS website and forums, used their calculator, but couldn't come to a conclusion with the final number (approx)…
user1270392
  • 2,981
  • 4
  • 21
  • 25
20
votes
2 answers

Why is Cloudfront loading scripts in my web app? (I don't use it)

I manage a secured PHP/MySQL web app with extensive jQuery use. Today, a strange error popped up in our app's logs: JS Error: Error loading script: https://d15gt9gwxw5wu0.cloudfront.net/js/_MY_WEB_APP_DOMAIN_/r.js We are not using Amazon's…
Andrew Ensley
  • 11,611
  • 16
  • 61
  • 73
20
votes
4 answers

How to disable access to cloudfront via the *.cloudfront.net url?

I created an AOI to restrict access of the s3 bucket to public. So you can not access the s3 objects via the s3 endpoint but cloudfront can access all those objects and serve them. I setup an Alternate Domain Names and add the SSL Certificate for…
rolele
  • 781
  • 9
  • 24
20
votes
1 answer

Pre-Signed S3 URLs with Cloudfront/CDN

Is it possible to generate pre-signed URLs for CDNs (i.e., CloudFront?), or can I append pre-signed URL parameters to a CloudFront URL to use instead? Example: string url =…
Ken K
  • 799
  • 3
  • 9
  • 18