When AWS CloudFront Can’t Find S3’s index.html
The Symptom
I requested the index.html file via CloudFront -> S3, but got this error:

The Cause
When CloudFront -> S3 forwarded the request, it passed the HTTP request’s url (dev-live11-view.11st.co.kr) as the host header. But the S3 bucket address can’t be found with that host (because it doesn’t exist).
The Solution
When forwarding the request from CloudFront -> S3, strip out the host header before passing it along. Of course, the request-forwarding configuration from CloudFront -> S3 needs to be set up properly beforehand.
20210902
Leave a comment