Building Your Debut Static Website with AWS Simple Storage Service (S3): A Beginner's Tutorial

Yukesh KYukesh K
3 min read

Amazon S3 is a robust storage service provided by Amazon Web Services (AWS) that allows you to store and retrieve any amount of data at any time. One of its versatile features is the ability to host static websites. Static websites consist of HTML, CSS, JavaScript, and other static files, without any server-side processing. This guide will walk you through the basics of setting up a static website using Amazon S3.

In order to start the hands on its necessary to understand what is the difference between a static website and a dynamic website.

Static Website :

A static website consists of fixed content—HTML, CSS, JavaScript, images, and other files—that does not change in response to user input. Unlike dynamic websites, which rely on server-side processing and databases, static websites deliver the same content to every visitor.

Dynamic Website :

A dynamic website is one that displays different content and allows for user interaction, in contrast to a static website, which displays the same content to every visitor. Dynamic websites use server-side processing and databases to generate content dynamically based on user inputs or other parameters

Let's walk through the steps to host a static website on AWS S3. This guide will include creating an S3 bucket, uploading website files, configuring the bucket for static website hosting, and making the website publicly accessible.

  1. Create a S3 bucket in AWS console.

  2. Disable the all public access check box and acknowledge turning off block all public access below.

  3. Navigate to the Properties tab in the S3 bucket we created and scroll down to see the Static Website Hosting option. Click on Edit and Enable the Static Hosting option and provide the name of the html file containing the content and save the changes made.

  4. Navigate to the Permissions tab and Edit the bucket Policy. Click on Add New Statement Button. Edit the Policy as follows :

  5. Now upload the static website content file of html format into the S3 bucket.

  6. Now go to the Properties section and at the bottom you can find the link to the static website. Click on the link and we will be able to see our static website hosted from our S3 bucket

Having successfully configured our static website using Amazon S3 bucket, we've harnessed its robust capabilities for various applications such as portfolio showcasing, blogging, and static documentation. Amazon S3 static website hosting stands out as a dependable platform, offering simplicity and efficiency in bringing your website to fruition. Embrace the power of AWS S3 to launch your static website effortlessly, ensuring reliability and optimal performance.

0
Subscribe to my newsletter

Read articles from Yukesh K directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Yukesh K
Yukesh K