S3 Static Website

Shawn W. Feltmate
3 min readJul 24, 2023

--

ChiknBank is a startup that offers digital banking services. The company’s website is the primary means of acquiring new customers, providing them with information about the services offered, and serving as a platform for them to interact with the bank.

Currently, the website is hosted on an on-premises server, which requires a dedicated IT team to manage and maintain it. This creates additional costs for the company, and also adds a level of complexity to the infrastructure. To address these challenges, ChiknBank has decided to move its website to AWS S3.

REQUIREMENTS:

  1. Amazon Web Services (AWS) account. It is best not to use the root user for this project. So,
  2. Create an IAM user with “AdministratorAccess” which is a policy permission.

STEPS:
01) Go to S3 console and click on “Create Bucket”.

02) Enter a unique name in “Bucket name” for your bucket and choose a region in “AWS Region”.

03) Uncheck “Block Public Access settings for this bucket”. It is checked by default.

04) Check the “I acknowledge…” box that will pop up to acknowledge that you are aware of what you are doing.

05) Leave the other options in their default state. Then click “Create bucket”.

06) Click on your newly created bucket and then click on “Upload”.

07) In the “Upload” screen click “Add files” and choose the file or files you want to put in the bucket. Make sure one of the files is your “index.html” file which is typically your website homepage. Then click “Upload”.

08) You will see a green bar at the top of the screen indicating your upload was successful.
09) Go back to your bucket on the S3 screen and click it. Then click “Properties”. Scroll down to “Static website hosting” and click “edit”.
10) You will enter the “Edit static website hosting” screen. Click “enable” and leave the default settings. Go to “Index document” and enter the name of your website homepage (index.html). Then click “Save changes”.

11) Again, you will see a green bar at the top of the screen indicating you were successful.
12) Go back to your bucket on the S3 screen and click it. This time click “Permissions” and scroll down to “Bucket policy” click “edit” and enter the policy you see in the picture below.
13) On line 12 replace “Bucket-Name” with the name of your bucket. Then click “Save changes”.

14) One more time, go to your bucket on the S3 screen. Click “Properties”. Scroll down to “Static website hosting” section and you will see highlighted under “Bucket website endpoint” your web address. Click it.

--

--

Shawn W. Feltmate

DevOps Engineer | Cloud Engineer | Google Cloud Platform (GCP) | Amazon Web Services (AWS) | Git & GitHub | Terraform | Kubernetes | Docker | Linux - Bash Shell