Can I host a static website on a private Amazon S3 bucket and then serve the website using CloudFront?

Last updated: 2019-05-30

I want to host a static website on an Amazon Simple Storage Service (Amazon S3) bucket and then serve the website using Amazon CloudFront. Can I keep the bucket for my website private? 

Resolution

No, you can't serve a static website hosted on a private bucket. Static website hosting on Amazon S3 uses a website endpoint, which doesn't support content that requires authentication (private content).

To limit access to your website hosted on Amazon S3 and served through CloudFront, you can do one of the following:


Did this article help you?

Anything we could improve?


Need more help?