S3 is one of the oldest and most popular services provided by AWS with high availability, durability, security, and scalability. S3 can be used to store a backup of the database, Big Data Analytics, media, and much more. It provides an object storage mechanism with an abstraction of Buckets, folders, and files. The abstraction is what makes S3 easy to use.
With S3 (a storage mechanism), there is no need to perform the capacity planning and to specify the initial capacity. As we put more data and delete data, S3 will shrink and expand automatically. S3 provides different storage classes to store different types of data (old/new, frequently/infrequently accessed) and the data can be moved from one storage class to another using S3 Object Life Cycle Management. Or else use the AWS S3 Intelligent Tiering to let AWS decide when to move the data from one storage class to another. AWS CloudFront which is a CDN (Content Distribution Network) can optionally be used to make the website load faster to the end-user.
S3 with the free tier provides 5GB of storage, 20,000 Get Requests, 2,000 Put Requests for free every month for the first year and beyond at on a pay-on-usage model. In this article, we would be creating a static website on S3.
Hosting Static Website with AWS S3
Here is the full tutorial video based on "How to Create and Host a static website in Amazon S3" and S3 C.O.R.S. 👇👇
Step 1: Creating Bucket in S3
- Go to the S3 Management Console and click on “Create Bucket”
Step 2: Giving the public permissions to the S3 Bucket
This step doesn’t give the public permission to the S3 Bucket but will allow us to make the Bucket and its content public later in the next step. AWS has introduced these additional steps and hoops, as there had been a good number of incidents where sensitive data has been put in the S3 Bucket and without the proper settings it was made public for everyone to access the sensitive data.
1 2 3 4 5 6 7 8 9 10 | { "Version":"2012-10-17", "Statement":[{ "Sid":"PublicReadGetObject", "Effect":"Allow", "Principal": "*", "Action":["s3:GetObject"], "Resource":["arn:aws:s3:::my-pictures-website/*"] }] } |
Note that the “Static website hosting” would be enabled by now. The Index document is the default HTML to be displayed and the Error document is the HTML to be displayed when the HTML page which we are trying to access is not there in S3.
Good Post! Thank you so much for sharing this pretty post, it was so nice to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeleteAWS Certification Training in Electronic City
ReplyDeleteGood website; where did you get the material for this post?
visit us