CloudFront S3 Endpoint Works, but Not as Website Endpoint

1

I am setting up an S3 bucket to host up static files through CloudFront (which I have done multiple times). I noticed when I set up the "Origin domain" as the S3 bucket I had configured, I received a message that said:

This S3 bucket has static web hosting enabled. If you plan to use this distribution as a website, we recommend using the S3 website endpoint rather than the bucket endpoint.

There was a button to "Use website endpoint."

Given that this seemed to be the right advice, I clicked "Use website endpoint" and went on with configuration. However, I could not access the actual site.

After working on it a bit, I went back to this setting and disabled the use of the website endpoint. This changed the Origin access settings (see screenshot below). I was able to select "Origin access control settings (recommended)" option and everything worked perfectly immediately.

options that show after I DO NOT use the website endpoint option

My confusion - why does the "Use website endpoint" not offer this option when its selected. It seems like it is needed. I have not seen any other information on anything else I need to configure if I choose this option.

1개 답변
0
수락된 답변

My confusion - why does the "Use website endpoint" not offer this option when its selected. It seems like it is needed.

S3 buckets can use Origin Access Control (OAC) or Origin Access Identity (OAI) to authenticate CloudFront distribution which requests to the bucket.

If you choose the S3 Website endpoint, CloudFront will recognize the origin as a Web Site, not a bucket. Therefore, OAC and OAI are not available.

profile picture
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠