MoonlightLion

How did I make my old website?

For those of you who opened up my old website link, you can clearly see that this website is exceedingly different from this website.  The main reason for that was that almost everything in my original website was made, edited and update using Visual Code Studio, by me and my current early day coding skills.

Here I will outline the architecture as to how I went about creating the website, providing what details where I can.

Services used: 
S3 static website hosting, Cloudfront, Route53

Going into the exact detail of absolutely everything I did to make this website would take an entire day, so as to not bog you down with all the nitty gritty in here, I have provided a couple of the links to the relevant AWS website documentation on how to execute these.  These go into the great that I learned and followed to launch them.

The first thing I did was to register a custom domain name - which you can do on the AWS DNS service, Route53.
I then created two buckets, one being the domain bucket (moonlightlion.co.uk), and the other being the subdomain bucket (www.moonlightlion.co.uk).  

The reason who this is that the domain bucket is where you host your content, and the subdomain bucket is used to redirect any searches for the "www.moonlightlion.co.uk" to the registered domain name.

Once the buckets were created, I went to the properties tab of the domain bucket and scrolled to the bottom where I enabled the 'Static website hosting' option and selected the 'Host a static website' hosting type.  In the 'index document' I entered 'homepage.html' which is what I intended to save my homepage file as.

After opening the "Block public access" in the permissions tab, I unchecked the "Block all public access" and saved the change.  Scrolling down to "Bucket Policy", I selected edit and then applied the following policy and saved;

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::moonlightlion.co.uk/*"
}
]
}

*For those of you who aren't in the know, there's a bearded hero named Jack Lavelle, who's somewhat of an AWS celebrity for us newbies and trainees.  Within a year he went from not having any AWS certifications, to 4x certifications and working as a TAM at AWS.  He was gracious enough to upload his​ template and code on his github account for others to play around with as they learned to build things.