less than 1 minute read

The Symptom

I requested the index.html file via CloudFront -> S3, but got this error: confusing

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

Tags:

Categories:

Updated:

Leave a comment