Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Contact
  • Reviews
  • Toggle search form
Home » AWS/Azure/OpenShift » Hosting Static Website and Versioning on AWS S3
  • Trellix BitLocker and fileVault Recovery
    Selfservice Recovery: Trellix BitLocker and fileVault Recovery Security | Vulnerability Scans and Assessment
  • screenshot 2020 04 07 at 02.14.53
    SSH and Telnet on Cisco ASA 5505: Quick Setup Guide Network | Monitoring
  • Implement Split Brain DNS Policies in Active Directory
    Implement Split-Brain DNS Policies in Active Directory Windows Server
  • sonarlite
    How to Setup SonarLint in VS Code for Your App Project Configuration Management Tool
  • ADDS vs AD LDS
    Differences between AD LDS and AD DS Windows
  • qAS
    How to disable the Microsoft Deployment Toolkit Task Sequence property sheet Windows Server
  • Featured image 1
    Add and Remove Folders in Favorites in Microsoft Outlook Windows
  • Troubleshooting Synology NAS Domain Join 2
    Synology NAS Domain Join: The Importance of DNS Configuration Reviews

Hosting Static Website and Versioning on AWS S3

Posted on 21/09/202121/12/2023 Temitope Odemo By Temitope Odemo No Comments on Hosting Static Website and Versioning on AWS S3
Static Website Hosting

Static websites can be defined as a type of website with a fixed display with the same content for every visitor to the website. This website is written in HTML and also prebuilt with CSS and JavaScript and uses a server-side rendering of these same files to every user. In this guide, you will learn about the steps to hosting a Static Website and Versioning on AWS S3. Please see how to Get your free Microsoft 365 E5 Sandbox today, and Video on Security researchers bypass Windows Hello with fake fingerprints with Raspberry Pi 4.

The word “static” means it does not change it remains the same for everyone as it is been loaded into the web browser for users to see. On a static website, you do not need to log in or perform some dynamic actions.

Versioning is one process that is very critical to any agile environment where application upgrade and maintenance are part of the software development life cycle.

Furthermore, Versioning is an important process because user’s need specific information about the application version currently deployed to their environment and also the upgrade versions available for installation or deployment.

You may also want a guide on how to create IAM users and setting policies for access to your static website by reading this Creating IAM Users, Adding MFA and Policies on AWS

Setting up your AWS Account

Setting up your AWS Account. Create an account via this AWS signup page

AWS S3
Sign Up Page

Log in to the AWS management console: https://signin.aws.amazon.com/

Versioning
Sign in as Root User

However, After you have successfully created an AWS account and logged in, then navigate to S3 under the services→storage option. Moreover, The next step is to create an S3 Bucket name.

Website Deployment
Selecting S3 as storage

Bucket Naming Rules for AWS: Uniqueness and Formatting

In addition, Please note that the bucket name must be unique across all AWS account and must not contain spaces or uppercase letters. 

Nonetheless, If you want to know how to create an S3 bucket read this guide How to Deploy an Angular App to AWS S3. A step-by-step process on how to create an S3 bucket is covered also.

Consequently, Our S3 bucket name is techdirectarchivestaticwebsite as the image below shows:

1: Click on the bucket name you created on your own AWS account but in our case we will click on techdirectarchivestaticwebsite.

Static Website Hosting
Bucket List

2. Click on the Upload button to upload your static website files from your local system.

Versioning
Uploading Page

3. Similarly, You can drag and drop files and folders you want to upload from the location you have your static website files or choose Add files or Add folders from the same location.

Website Deployment
Uploading Page

4. Copying the static website files from a location on my computer

image-30
Local System with deployment files

The below image shows the files that will be moved from my computer:

image-31

5. Click on the Upload button to start uploading the files

image-32
Uploading of Files

6. The uploading status for your files will display and when completed you the status will change.

image-33
Upload Status Page

Configuring Access Permissions for Uploaded Files on AWS S3

7. Now that the whole files have been uploaded successfully, make sure you check the Permission tab and in the permission overview change the access to Public. You can edit the bucket policy with the below policy below but make sure you change the Resource name to yours

image-34
Bucket Policy

But note that it is recommended that you block all public access to your buckets, we are only using this Public access to explain in this guide.

image-35
Permission Overview Page

8. In the Properties tab scroll down to the Static website hosting section and click on the Edit button. In the Static website options select Enable and in the Hosting type options select Host a static website.

image-36
Static Web Configuration

9. In the Index document section enter index.html while in the Error document enter error.html.

image-37
Index and Error document

10. To make the files accessible to the public you need to go to the objects tab and select all the files and choose Make public as the action.

image-38
Objects details

11. Click on the Make public button.

image-39
Making Files Public

Files status now public

image-40
Public Status

12. Go to the Properties tab and scroll down to the Static website hosting section, click the URL.

image-41
Static Website Hosting Details

13. Congratulations: here come our static website

image-42
Our Static Website

Versioning our deployment files

When you activate S3 Versioning it will help keep multiple versions of an object in one bucket with different version id. It will also help to restore objects that are accidentally deleted or overwritten.

Let’s take for example if an object is deleted, instead of removing it permanently, Amazon S3 will insert a delete marker. Follow these short steps to version your deployment to AWS S3.

14. Under the Properties tab scroll down to the Bucket Versioning section and click the Edit button and select Enable.

image-43
Bucket Versioning

Now since Bucket Versioning is now enabled on our S3 Bucket let’s try and make some little adjustments to our uploaded files locally and try to upload again and let’s see the effect.

15. In this instance we will be making some little adjustments to the index.html file and re-upload it to our S3. After uploading it you will see a new version id assigned to it while the older version (circled index.html) will now be linked to the new version above it as we have in the image below.

image-44
Website Files

Now our static website has now picked the new changed and the image below shows the newly deployed version of our static website.

image-45
Static Website Version 2

Effortless Version Copying: Downloading Versions Made Simple

If you want to copy any of the versions you can just go to the action drop-down and select Download.

16. Another thing we will be checking is when deleting an object or file on S3 that the versioning is enabled. For instance, we will try and delete the delete.txt file in the image below. Click on the Delete button.

image-46
Deleted File

The below image will be displayed after clicking the Delete button. In the Delete objects section enter delete in the text input field.

image-47
Delete Objects Overview

17. After deletion you will notice that a Delete marker will be placed on the deleted file. If you need the deleted file back you only need to select the deleted file with the Delete marker and click the Delete button.

image-48
Delete Marker

When you recheck the deleted files you will see that it has been returned back to the previous location.

If you have followed this guide to this end you will be able to host a static website and do versioning for your deployed files.

I hope you found this blog post on how to host static websites and versioning on AWS S3 very interesting and helpful. In case you have any questions do not hesitate to ask in the comment section.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
AWS/Azure/OpenShift, Version Control System Tags:AWS, AWS s3, s3, Version Control

Post navigation

Previous Post: How To Deploy Azure VMware Solution Private Cloud
Next Post: Exchange Recovery: Repair EDB Files and Recover Mailboxes

Related Posts

  • Implement Azure Bicep
    How to Deploy Azure Resources Using Azure Bicep Automation
  • Ec2 Instance
    How to create an EC2 Instance AWS/Azure/OpenShift
  • image 19
    Download your MySQL database from Azure to a local PC with MySQL Workbench AWS/Azure/OpenShift
  • header picture 1
    Azure CI/CD: Configuring Email Notifications in Azure DevOps AWS/Azure/OpenShift
  • a Multiple SPF Records  Issues and Examples@2x
    How to setup SPF and TXT Records in AWS AWS/Azure/OpenShift
  • azurv2 1
    How to scale up and scale out on Azure AWS/Azure/OpenShift

More Related Articles

Implement Azure Bicep How to Deploy Azure Resources Using Azure Bicep Automation
Ec2 Instance How to create an EC2 Instance AWS/Azure/OpenShift
image 19 Download your MySQL database from Azure to a local PC with MySQL Workbench AWS/Azure/OpenShift
header picture 1 Azure CI/CD: Configuring Email Notifications in Azure DevOps AWS/Azure/OpenShift
a Multiple SPF Records  Issues and Examples@2x How to setup SPF and TXT Records in AWS AWS/Azure/OpenShift
azurv2 1 How to scale up and scale out on Azure AWS/Azure/OpenShift

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Trellix BitLocker and fileVault Recovery
    Selfservice Recovery: Trellix BitLocker and fileVault Recovery Security | Vulnerability Scans and Assessment
  • screenshot 2020 04 07 at 02.14.53
    SSH and Telnet on Cisco ASA 5505: Quick Setup Guide Network | Monitoring
  • Implement Split Brain DNS Policies in Active Directory
    Implement Split-Brain DNS Policies in Active Directory Windows Server
  • sonarlite
    How to Setup SonarLint in VS Code for Your App Project Configuration Management Tool
  • ADDS vs AD LDS
    Differences between AD LDS and AD DS Windows
  • qAS
    How to disable the Microsoft Deployment Toolkit Task Sequence property sheet Windows Server
  • Featured image 1
    Add and Remove Folders in Favorites in Microsoft Outlook Windows
  • Troubleshooting Synology NAS Domain Join 2
    Synology NAS Domain Join: The Importance of DNS Configuration Reviews

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.