If you’ve registered your domain with the Amazon Registrar you should see that a hosted zone has been setup for you with two record sets. So your website is up and running but only accessible via the bucket endpoint and not your custom domain. Your buckets are now ready to go! Configure Domains with Route53 Redirect requests back to the main bucket using HTTP protocol The second bucket (we will leave empty but configure to redirect to our first bucket using HTTP as the protocol (we’ll make it HTTPS later). Progress! But we can do better than that. Now, if you head to the endpoint defined in the static hosting config of the bucket, you should see your website. This is a simple policy that will only allow public read access of objects in the bucket. We can do this by setting a Bucket Policy under the Permissions tab.
We also need to make this bucket publicly accessible as a user’s browser will need to access the bucket’s files in order to render the website. You can find this under the Properties tab of the bucket, and we’re going to keep the defaults provided here with the index of the site set to index.html. Next we setup this bucket for static site hosting.
This contains all your files and assets for your static website.
We’ll be using a combination of the following AWS services:įirst, you’ll need two S3 buckets, both should match your custom domain name with the second including the is the main bucket for your site. Generally speaking these shouldn’t exceed $1/month. However, the services we are going to use do incur some small charges. All this is possible using AWS free tier.
In this tutorial I’ll show you how to host a static website with HTTPS on AWS with a custom domain. By Georgia Nola Simple site hosting with Amazon S3 and HTTPS Photo by Domenico Loia on Unsplash