Host A Simple Website on Amazon s3

A step by step guide below on the process.

Extra Credit below:

We are going to implement a bucket policy on the index.html so it can’t be deleted.

As you can see in the below image if we try to delete the index.html file, we get an error saying that we failed to delete the object(s).

How do we update the index.html file?

We have to go to the same file that we uploaded the first time and make a change. As you can see in the below picture that we go to the file and open it in notepad we will see a bunch of characters. We press ctrl + F to find and enter in <First Name> and change it to our name. Then save the file and upload it to the bucket again.

Before we see the below website page it will throw an error saying Access Denied. So we have to head over to our bucket, select the file, and make sure make the file public again so that we can see the changes. Then head over to the static url that the bucket provides, then boom 💣we see our changes.

Then you can go to the objects tab on your bucket to see the option for enabling show versions like the below picture.

Hooray 🙌🎉!! You’ve done it. Pat yourself on the back. Welcome to the cloud.

mmoorewebdev.com
mmoorewebdev.com