S3 static website hosting

Posted: May 14, 2019 in Uncategorized

Steps to host s3 static website
1. Create a bucket – Ensure the bucket name should be same as the domain for which you want to create a subdomain or alias record
Ex: If the domain is example.com bucket name should be testbucket.example.com. So that S3 end point will be shows under target list while creating alia A recrd set.
2. Bucket permissions.
Block all public access – Off
Block public access to buckets and objects granted through new access control lists (ACLs) – Off
Block public access to buckets and objects granted through any access control lists (ACLs) – Off
Block public access to buckets and objects granted through new public bucket policies – Off
Block public and cross-account access to buckets and objects through any public bucket policies – On

3. Enable Bucket properties – Static website hosting

4. Get the Domain from the static website hosting

5. Route 53
> Select hosted zone > Create record set > Edit record set > name should be bucket name >
Type > A > Alias > Yes > Alias target > Select the s3 website end point > Save record

Leave a comment