In this Documentation you'll get to know how simply host a static website in AWS S3 in AWS free tire account
Checkout my website:
http://elangoportfolio.s3-website-ap-southeast-2.amazonaws.com/
Login or Sign up your AWS account (you will get 5GB free Tire AWS Accout for one Year)
- Search AWS S3 in the search bar
- Select AWS S3 (Simple Storage Service) and select Buckets
- In Buckets you have to create new bucket by selecting Create Bucket
- Name the bucket as per the naming convention and unmark the block all public Access
- Now click create bucket don't change any other configurations
- Tada!!! Now Your AWS S3 bucket created, Inside that go to the properties tab
- Scroll Down to the last and click edit Static web Hosting
- Enable the the static web hosting and type your html document name eg.Index.html
- Now select the Permissions tab and edit the bucket policy
-
Clear the existing policy if anything already avilable, paste the below configuration { "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::replace with yout domain name/" } ] }
-
Now it's time to upload the our html,css,javascript files
- Click upload and select the required files or folders
- After uploding again come to properties tab scroll down to the last find the hosted link.
Boom!! Your website now hosted in AWS S3
Full Documetation by AWS
https://docs.aws.amazon.com/pdfs/AmazonS3/latest/userguide/s3-userguide.pdf#HostingWebsiteOnS3Setup