Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloudfront redirecting to S3 endpoint with 307 Temporary Redirect

I'm getting cloudfront endpoint redirecting to S3 with 307 Temporary Redirect. Is there a reason why this is happening?

I've tried creating website endpoint and changed the origin but no luck with same result.

like image 388
Passionate Engineer Avatar asked Dec 06 '22 13:12

Passionate Engineer


1 Answers

The Temporary Request Redirection It's actually caused by the way S3 buckets behave when they are newly-created (thanks to @Michael-sqlbot) for clarifying this.

From the docs (Temporary Request Redirection)

Due to the distributed nature of Amazon S3, requests can be temporarily routed to the wrong facility. This is most likely to occur immediately after buckets are created or deleted. For example, if you create a new bucket and immediately make a request to the bucket, you might receive a temporary redirect, depending on the location constraint of the bucket.

like image 179
nbari Avatar answered Dec 28 '22 11:12

nbari