S3 Bucket Setup
Create S3 Bucket named with the same name as the domain you wish to host.
e.g. example.com
Properties Tab
Set the bucket to support Static Website Hosting.
Put index.html in for your index document.
Make note of the S3 domain.
Permissions Tab
Setup bucket policy, be sure to change resource domain to match the domain you want to host.
{
"Version": "2012-10-17",
"Id": "Policy1500207679949",
"Statement": [
{
"Sid": "Stmt1500207675990",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example.com/*"
}
]
}
For non-SSL
Create another bucket to perform redirect from www to non-www domain.