4: Go live.

So what have we got so far?

I now have a live static s3 website hosting the old pubgolf website file.

I also have a local website set up and configured using jekyll.

Time to make some changes…

update s3 bucket

I have ran

jekyll serve

on my local site. This generates a copy of the site files in a _site sub folder. this is the new source folder for the site.

On the s3 bucket I have all the old files. I also have a backup copy of these files.

delete contents of s3 bucket

To make a clean update I’m goign to delete the contents of the bucket and upload every thing new

aws s3 rm s3://pubgolf.co.uk --recursive

Checking the site via the webpage I get a 404 error as all the files have gone

upload the new website files

To do this I use the aws cli command to synk the _site jekyll folder with the bucket.

aws s3 sync _site s3://pubgolf.co.uk

The files uploaded successfully.

Doing a Control+F5 refresh on my browser gives me the updated site.

things to do still…

I want to set up a contact form that works.the one that is in the site at the moment is not working just yet. I also intend to set up a website counter. Both of these will be using an api-gateway and a lambda function. the contact form will also use SNS while the counter should be using dynamodb. But that is for another day!

Updated: