[Recipes] Creating a Static Website Using S3

Problem: 

Need to create a static website using S3.

Solution Summary: 

We will create a static website in S3 using the Static Website feature of S3.

Prerequisites: 

This note assumes that you are familiar with AWS console and creating S3 buckets. This note also assumes you are familiar with HTML at least and could create a simple few page website with some navigations.

Solution Steps: 

  1. Create a simple few page website with some navigations. Should create at least a landing page as index.html and an error page as error.html.

  2. Create an S3 bucket. Leave all options as default.

  3. Upload the static website files to the S3 bucket.

  4. Under bucket properties, go to Static Website Hosting and select the option: Use this bucket to host a website.

  5. Specify a landing page (e.g. index.html) and error page (e.g. error.html), and click save.

  6. Under Static Website Hosting, you can also get your endpoint for the website. Click on the link and verify (make sure you have read permissions for files). You should see the index.html file.

  7. Make index.html private and access the endpoint again. This time you should see the error.html page loaded.

 

Important Notes (Exam Tips)

  1. S3 static websites is a highly available hosting solution that scales automatically for static file websites that use only HTML, Javascript and CSS.

Recipe Tags: 

Learn Serverless from Serverless Programming Cookbook

Contact

Please first use the contact form or facebook page messaging to connect.

Offline Contact
We currently connect locally for discussions and sessions at Bangalore, India. Please follow us on our facebook page for details.
WhatsApp (Primary): (+91) 7411174113
Phone (Escalations): (+91) 7411174114

Business newsletter

Complete the form below, and we'll send you an e-mail every now and again with all the latest news.

About

CloudMaterials is my blog to share notes and learning materials on Cloud and Data Analytics. My current focus is on Microsoft Azure and Amazon Web Services (AWS).

I like to write and I try to document what I learn to share with others. I believe that knowledge is useless unless you share it; the more you share, the more you learn.

Recent comments

Photo Stream