- Newest
- Most votes
- Most comments
Hi Yoel,
You can configure the S3 static website hosting using your own customer domain with LightSail DNS, the process is very similar to when using R53, you just need to follow the below steps:
Lets say you have a domain named: example.com
- Create an S3 bucket with a subdomain, e.g "www.example.com" - for the apex you will need to use R53 Alias records.
- On the S3 console, go to the bucket, Properties, "Static website hosting", edit.
- Select "Enable", input your index document and Save.
- Scroll down and take note of the S3 static website endpoint (without the bucket name), should be something like "s3-website-{region).amazonaws.com" - more details on the endpoint per region on the link
- Under LightSail, select "Domains & DNS", select your domain zone and under "DNS records" add a new record.
-
Record type: CNAME
-
Record name: www (so it becomes www.example.com)
-
Route traffic to: Input your static website endpoint, e.g "s3-website-eu-west-1.amazonaws.com" for a bucket in Ireland, Save.
-
Your should have something like:
-
Having done the above and once you have a bucket policy that allows public Read (s3:GetObject) from your bucket, you can now use your custom domain to access your website hosted on S3.
Note: S3 static websites are only available through HTTP, if you would like to use HTTPS, use Amazon CloudFront to serve a static website hosted on Amazon S3 as explained on the link.
Relevant content
- asked 5 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 10 months ago