Hosting a static website on Amazon S3

Tadashi Shigeoka ·  Tue, August 13, 2019

Here’s how to host a static website on Amazon S3.

AWS | Amazon Web Services

Publishing static site with S3 only

静的ウェブサイトホスティング用に S3 バケットを設定する方法 - Amazon Simple Storage Service

The method to publish a static site with S3 is completed just by configuring according to the AWS official documentation above.

In practice, you’ll probably create an S3 bucket first, so the work will be done in the following order:

  1. S3 バケットを作成する方法
  2. 静的ウェブサイトホスティング用に S3 バケットを設定する方法

Publishing static site with CloudFront + S3

It’s not common to publish a static site with S3 alone, and it’s often used in combination with CloudFront.

Operating with S3 alone has the risk of high billing when there’s heavy traffic to the S3 bucket. By using CloudFront and S3 together, you can prevent high billing.

For detailed comparison, please refer to the following article:

CloudFront + S3 で静的サイトを運用する際の注意点 - Qiita

That’s all from the Gemba.