This tutorial explains how to host your static website on Amazon Web Service S3 with your custom domain name on gandi (or on any other registrar).
The name of the bucket should be your domain name:
example.com
Go to bucket properties, then Static website hosting and select enable website hosting
. Index document should be index.html.
Click save
Upload the content of your website in your bucket and make the files public.
Get the endpoint of your bucket (eg. example.com.s3-website.eu-central-1.amazonaws.com) and run ping to get the IP.
ping example.com.s3-website.eu-central-1.amazonaws.com
PING s3-website.eu-central-1.amazonaws.com (54.231.194.51): 56 data bytes
@ 3600 IN A 54.231.194.51
www 3600 IN CNAME example.com.
After a few hours, your domain name should be available (under root domain example.com
) and www.example.com
should be redirected to example.com
.
Next step: deploy from your source control system (bitbucket or github) to AWS S3 automatically
Hi, I don't think this will work - S3 can and does use different IPs each time it serves the content from any particular bucket. Each time you ping the bucket endpoint you get a different IP... You need to set something up using route 53 to attach a particular domain name to a bucket.