Hosting a website on Amazon S3


  • Create bucket
  • Enable website on bucket
  • Change bucket policy
  • Upload index document
  • Domain DNS settings

Log in to the Amazon S3 Management Console

Create bucket

if you haven’t done so already, you’ll need to create a bucket.

This bucket needs to be the same as your URL you want to host.
For example

Enable website on bucket

Right click on your newly created bucket and select properties.


Select the Website tab.
Ensure enabled is ticked, and enter the name of your index (default) document.


Change bucket policy

You need to change the bucket policy to enable public viewing of the contents.

	"Version": "2008-10-17",
	"Id": "0fc0b0d1-8e11-45f8-9851-a49af3bfb649",
	"Statement": [
			"Sid": "PublicReadForGetBucketObjects",
			"Effect": "Allow",
			"Principal": {
				"AWS": "*"
			"Action": "s3:GetObject",
			"Resource": "*"

Upload index document

You then need to upload this document to the bucket.

You can do this directly in the AWS Console, or by using any number of S3 clients.

Test your “website” by going to the Endpoint listed. In the example above, it would be:

It should display your default document you uploaded above.

Domain DNS settings

Take a note of the “Endpoint” URL in the website configuration tab.
In our example, it’s

You will need to setup a CNAME on your domain to map to

And that should be it!


Leave a Reply

Your email address will not be published. Required fields are marked *