Popular Posts
-
We can offer a wide variety of hosting options such as Amazon Web Services, Microsoft's Azure, Nexcess, WPengine, Liquid Web, Panthe...
-
Donald J. Trump has entered presidential politics like a force of nature, thrilling some, horrifying others, and contributing to a nominat...
-
/EINPresswire.com/ -- SANTA FE, NM--(Marketwired - October 15, 2016) - CrowdReviews.com, an online platform for B2B service reviews, urges...
-
ASPHostPortal.com - the leader of ASP.NET hosting provider launches Entity Framework 7 hosting with Fast Speed, Excellent Service, and C...
-
HostForLIFE.eu, a leading web hosting provider, has leveraged its gold partner status with Microsoft to launch its latest Umbraco 7.3.0 ...
-
The costs of setting up and maintaining a website can add up quickly and it is not an easy task to make the choices at the start and sta...
-
Published Thursday, Jul. 28, 2016, 7:16 pm Front Page » Podcasts, Etc. » Video: Two new episodes of God and Country Music web TV ser...
-
1011 8 hours ago from Steve Orchosky, UI/UX Web Designer Hey all! I was wondering what everyone uses to host your websites (...
-
And while mostly giving Google a pat on the back with this announcement, I felt like it stopped just short of a resounding end...
-
Introduction I am writing this article as a result of my learning for deploying ASP.NET Core web applications on Linux boxes. There is a ...
Blog Archive
- December (19)
- November (25)
- October (28)
- September (26)
- August (28)
- July (31)
- June (26)
- May (27)
- April (28)
- March (30)
- February (28)
- January (31)
- December (31)
- November (30)
- October (31)
- September (29)
- August (44)
- July (56)
- June (53)
- May (54)
- April (48)
- March (55)
- February (44)
- January (3)
- December (5)
- November (5)
- October (26)
- September (25)
- August (29)
- July (26)
- June (18)
- September (1)
About Me
Total Pageviews
How to Host Static Website or Content on AWS S3 Storage
July 17, 2017 by Sajal Chakraborty
Learn about Amazon S3 (Simple Storage Service), creating a bucket in AWS S3 and then hosting static website or static contents in the storage area.
Table of Contents What is AWS S3 Static Website Hosting with AWS S3 What is AWS S3The Amazon S3 is a easy-to-use object store and one of the oldest services on AWS platform. Amazon S3 is an acronym for Amazon Simple Storage Service. It's a typical web service that enables us to store and retrieve data via an API reachable over HTTPS. The service offers unlimited storage space and stores your data in a highly available and durable and secured way.
In S3 we can store any kind of data, such as images, documents, and binaries, as long as the size of a single object doesn't exceed 5 TB.
Key terminologies of AWS S3Amazon S3 has below storage class which customers can choose –
Before starting this exercise we need to register ourselves with the AWS free tier account. AWS provides this type of access for 1 year to do the practice on different services. It is very straight forward and to do that you need to follow this link https://aws.amazon.com/ and need to click on "Create an AWS Account" button in top right corner of the home page itself.
Give required registration details. It will ask for some credit card, feel free to provide your own, AWS will not bill unless you have tried the services that does not falls under free tier.
Once you have registered and received the credentials, you need to login to the AWS console and after login the console will look like
Go to S3 console by clicking on the respective link from the storage section. The S3 console will look like below. Please note that AWS frequently update their portal, so the actual view may be little bit different from given image. But the overall functionalities should be same.
Now click on the create a bucket in the S3 console, and enter a bucket name. Please note that the bucket name is unique in the overall AWS platform, so you might face some error message like bucket already exists if you enter a duplicate bucket name that is already created in AWS by someone before. So, choose bucket name efficiently to avoid this. You can follow official AWS S3 bucket policy for more details.
Once you are able to create the bucket, it will come in the middle of the screen like below.
Now click on the bucket name and you will go to the bucket details page.
For demo purpose, we will create a sample HTML file and will upload in S3 and will access it from internet. This is the upload screen once we click on the Upload button.
I have created one html file index.html and uploaded in the S3. This only contains some static text. The content of the page is very simple as below. Feel free to use any static content such as CSS files, images or browser scripts.
<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <h2>Hi, Welcome to AWS S3 world!!!</h2> </body> </html>After uploading the screen will look like this.
Now we will try to access the HTML file from internet. To do that first we need to know the address of this page. We need to go to the details of the object by clicking on the link of the object. The details screen will look like below.
Now click on the link in a separate tab and you can expect one 403 forbidden error. As in AWS everything is private and secure by default. Now we need to set permission to enable the public access of this file to the outside world.
Now in order to make this file accessible to the outside world, we need to make this file public.
It is also very simple, just click on Make public button in the top to make this file public, so that everyone can access this from outside world. Once we have make this link public, let's again try to access this from a separate tab to see if it is accessible.
Congratulations !!! You have successfully set up our first static website in S3 by just clicking on couple of buttons.
Please feel free to give your comment if you face any difficulty here, we will be happy to look into the problem.
Happy Learning !!
Source: How to Host Static Website or Content on AWS S3 Storage
0 comments:
Post a Comment