Documente Academic
Documente Profesional
Documente Cultură
Discussion Forums > Category: Storage & Content Delivery > Forum: Amazon CloudFront >Thread: Cloudfront domain redirects to S3 Origin URL
cloudfront , s3
Icon Legend
Answered question
This question is not answered. Answer it to earn points.
Unanswered question with
answer points still available
I've configured a CloudFront distribution to Amazon S3. Unanswered question
Replies: 18 | Pages: 1 - Last Post: Oct 21, 2017 4:35 PM by: alz70
R li
https://forums.aws.amazon.com/thread.jspa?threadID=216814 1/10
10/24/2017 AWS Developer Forums: Cloudfront domain redirects to S3 ...
Replies
Hello,
I have engaged the team with regards to the temporary redirect you are experiencing. I will provide you an update
once more information becomes available.
Regards,
Mohsin
Hello,
Any idea ?
Hello,
Temporary redirects contain a URI to the correct facility which you can use to immediately resend the request.
Regards,
Mohsin
It's been 3 days i've created this bucket in singapore region, but redirect is still happening?
https://forums.aws.amazon.com/thread.jspa?threadID=216814 3/10
10/24/2017 AWS Developer Forums: Cloudfront domain redirects to S3 ...
Hello,
Could you please let us know if you are still facing the issue?
$ curl -I http://d2pgt27y8augeg.cloudfront.net/index.htm
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 26987
Connection: keep-alive
Date: Tue, 29 Sep 2015 08:05:02 GMT
Last-Modified: Sun, 27 Sep 2015 14:37:44 GMT
ETag: "a4ea84ac5b40f2f291813c7382617e0c"
Accept-Ranges: bytes
Server: AmazonS3
X-Cache: Miss from cloudfront
Via: 1.1 6ac547ea4fdffc736699ded8bb83b53f.cloudfront.net (CloudFront)
X-Amz-Cf-Id: 7qQVmiE2B3XDneghJFm5GmKv45JztdIe1hkD-zsBsgiNfccI7dN0Ag==
$ curl -I http://d2pgt27y8augeg.cloudfront.net/index.htm
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 26987
Connection: keep-alive
Date: Tue, 29 Sep 2015 08:05:02 GMT
Last-Modified: Sun, 27 Sep 2015 14:37:44 GMT
ETag: "a4ea84ac5b40f2f291813c7382617e0c"
Accept-Ranges: bytes
Server: AmazonS3
Age: 259
https://forums.aws.amazon.com/thread.jspa?threadID=216814 4/10
10/24/2017 AWS Developer Forums: Cloudfront domain redirects to S3 ...
Age: 259
X-Cache: Hit from cloudfront
Via: 1.1 8fc65dcda78bf068d73aff832a00116f.cloudfront.net (CloudFront)
X-Amz-Cf-Id: ZGKLJX2jOLziLmYRj71-tAS4R_cWrpLdgj-dbK_f5QkQAg8OQaJdPQ==
Best Regards,
Hello,
As noted earlier, it is most likely the temporary redirect occurred due to the recent creation of the S3 bucket. This
redirect that was experiencing is now resolving as you have mentioned. Please do let us know if you require any
further assistance.
Regards,
Mohsin
https://forums.aws.amazon.com/thread.jspa?threadID=216814 5/10
10/24/2017 AWS Developer Forums: Cloudfront domain redirects to S3 ...
Posted on: Sep 30, 2015 7:43 PM
Hi,
I have done the following as I am based in Singapore and wanted to see how effective edge locations were.
1) Created a bucket in London and added a picture all with public read only permission on bucket and picture.
2) Access picture and it takes as expected about 9 seconds.
3) Created a distribution
4) Once created entered as others the distribution url however it gets re-directed to the bucket url. So basically
does not seem as if cloudfront is picking it up.
so https://d3cm8fvomvh72e.cloudfront.net/IMG_4183.JPG
http://s3.eu-west-2.amazonaws.com/mark-channing-london/IMG_4183.JPG
I disabled the cloudfront and then the cloudfront address no longer worked, which is obvious.
Is it just that newer browsers end up showing the actual url as opposed to just showing the cloud front?
At my office on an older version of chrome when used the cloud front url it did not change to the amazon s3 url.
May be the time between creating bucket and setting up distribution affects the outcome?
There is a bigger problem here when using CloudFront Origin Access Identities with private buckets. My distro is
returning a 307, pointing to the origin s3 file url, but since the bucket is private with no website hosting enabled
(only allowing access through CloudFront), that redirect returns a 403. How can I solve this without making my
bucket public?
Sorry to revive this thread, but I am experiencing exactly the same behavior, and invalidating the cloudfront
distribution doesn't seem to help at all.
Hi,
Are you still experiencing the redirection issue? Would you let us know of the distribution domain name please?
I am experiencing this as well. I just launched a CloudFormation stack that includes an S3 bucket, a CloudFront
distribution, and a few Route 53 record sets.
The CloudFront distribution's domain name is d2v6jyq6mjpcyk.cloudfront.net. When I visit that (or the human-
friendly URL that I have configured via Route 53), I am sent to {my bucket}.s3-us-west-2.amazonaws.com instead.
I have tried invalidating the CloudFront cache, but it has not resolved the issue.
Hi,
This is an expected behavior when you create a new bucket. The following pages explains the concept:
http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
"Amazon S3 routes any virtual hostedstyle requests to the US East (N. Virginia) region by default if you use the
US East (N. Virginia) endpoint (s3.amazonaws.com), instead of the region-specific endpoint (for example, s3-eu-
west-1.amazonaws.com). When you create a bucket, in any region, Amazon S3 updates DNS to reroute the request
to the correct location, which might take time. In the meantime, the default rule applies and your virtual hosted
style request goes to the US East (N. Virginia) region, and Amazon S3 redirects it with HTTP 307 redirect to the
correct region."
Please give some time to S3 until the domain name becomes ready (normally an hour or so). Also, please note,
errors are cached in CloudFront by default. This means "307 Temporary Redirect" is cached for 300 seconds unless
you change it:
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html
In order to test your cloudfront again, please make sure the cache has been invalidated:
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html
https://forums.aws.amazon.com/thread.jspa?threadID=216814 8/10
10/24/2017 AWS Developer Forums: Cloudfront domain redirects to S3 ...
aws , cloudfront
adamrothman, I'm also having an issue with redirect to S3 Buckets. Mine appears to be with the CloudFront
Distribution. I saved the distro with Yes, Update my bucket policy. I save the distro and waited until it was
Deployed; Enabled. Tried the Cloudfront URL and got a redirect to the S3 bucket. I went into the Distibution, Origin
Tab for the new distro and edited it, and to my surprise my Bucket Permission was listed as No, I will update
permissions.
Were you able to resolve your issue? If so can you explain how.
Regards,
Eric
It can take a long while to stop getting the 307 redirects that show as the URL changing from the CloudFront URL to
the bucket's URL. I guess even longer than a year ago or whenever CloudFront became part of the free tier. Just
keep trying CURL -I until it returns a hit instead of a miss while using the CloudFront URL. I let it bake way more
than 1 day after waiting for a couple of hours.
https://forums.aws.amazon.com/thread.jspa?threadID=216814 9/10
10/24/2017 AWS Developer Forums: Cloudfront domain redirects to S3 ...
Products & Services AWS Marketplace Management Console What is Cloud Computing?
Case Studies Sample Code & Libraries Billing & Cost Management Events & Webinars
Economics Center SDKs & Tools Personal Information Careers at AWS
Architecture Center Documentation Payment Method Contact Us
Security Center Articles & Tutorials AWS Identity & Access Management Announcements (What's New?)
Whitepapers Management Console Security Credentials AWS Blog
Training & Certification Flexible Payments Service Request Service Limit Increases Press Releases
Webinars Media Coverage
Industry Solutions Developer Centers Support Legal
Use Case Solutions
User Groups Java AWS Support
Site Terms Privacy Policy 2013, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://forums.aws.amazon.com/thread.jspa?threadID=216814 10/10