As I am working on gaining knowledge and real world skills in AWS, I figured one good starting point would be to create a static website using S3 and here I will document what I did to make this work successfully.
I began by making a new S3 bucket, naming it something unique, as every bucket in the whole AWS world must have a unique name. I also enabled versioning in the setup process so I can see older versions of my website when I update it or if I update it and the update messes up the website I have a known good version to roll back to. After creating the bucket, now it’s time for me to add my files to it. I will start off with a simple HTML file to get up and running. After I uploaded the index.html file to my S3 bucket I needed to make the bucket public or else nobody would be able to access the website. After making the bucket and its contents visible to the public I needed to enable static web hosting under the properties tab.
Now, after all of the steps I listed above I thought I was done and that it would work properly. I clicked on the static link provided for my website and I was getting an error. Even though I made the bucket public for anyone to see there were no permissions set on what could be accessed and by who. So I needed to write a bucket policy that would allow people access to my bucket and the files within, which would allow my website to load for them. After adding this bucket policy my static website was up and functioning.
This was a fun and easy little project to give myself a little more experience and confidence in AWS. The link to the website is below.
http://projectbobbystaticwebsite.s3-website-us-east-1.amazonaws.com/