As you know practice makes perfect so a challenge is a great way to get your hands ‘cloudy’. I’ve been doing my own 100 Days in Cloud Challenge but those are often short-lived and except a blog post. So when I found out about the Cloud Resume Challenge and the community around it, I got really excited and started working right away. The author of the challenge is a co-worker at A Cloud Guru learning site where I usually get my theoretical knowledge about AWS. He wrote an ebook with some nice guidelines on what should be included in the final output of the Challenge.

Unlike most technical resources you’ll find, the

Cloud Resume Challenge isn’t a tutorial or a how-to

guide. It’s a project spec, and not a very helpful one

at that. It tells you what the outcome of the project

should be, and provides enough structure that you

don’t go too far off the rails, but other than that –

you’re on your own!

The Cloud Resume Challenge Book by Forrest Brazeal

Challenge accepted!

– I answered

The Challenge is to build and deploy a resume website on AWS. I divided it into two parts according to the requirements: first, deploy the resources manually using the console, that’s what I’m covering in this post, and call Part One. Part Two is to do the same process using automation like SAM or Terraform.

Part One is to build my Resume HTML + CSS website, backed with API and database, and deploy it in the AWS ecosystem. I divided it into two main steps:

  1. Frontend: create a responsive website
    • HTML
    • CSS
    • JavaScript
  2. Backend: create AWS resources:
    • DynamoDB – it’ll be used for storing the visitors count
    • Gateway API – hitting the Resume website will make a call to API that is integrated with ->
    • Lambda function – upon a API request this function is being invoked, it increments the visitors value in the table and returns the current value back to API
    • AWS Certificate Manager – SSL certificate for ->
    • CloudFront distribution – in order to make the site secured and leveraging the TLS custom certificate is applied and Resume site is globally distributed and cached

The steps

I’ve spent quite some time fixing my website because I wanted a responsive design and one that Resume page would match my existing blog. For deploying and updating the code I’ve set up GitHub actions that uploaded the latest committed code to the S3 where the website is hosted. I already have a WordPress blog hosted at AWS LightSail with a CloudFront distribution I needed to add that profile page to my existing DNS records. I really like the idea of working with GitHub Actions, it’s so smooth and easy to code your website in VSC with Live Server extension (strongly recommended) and push the code to the GitHub repository whenever ready.

Creating the DynamoDB table was straightforward, it’ll only need one Item with id and one attribute. Lambda function is pretty simple too, just needed to update the item’s attribute with one each time it’s invoked and return status code 200, API Headers, and the visitors value. Gateway API has only one GET method integrated with Lambda. The GET request to the API is made by a script included in index.html and displayed on the bottom of the page.

counter

When I got the website up and running I needed to make it secure and available globally. Here’s where CloudFront CDN comes in. That part was also pretty straightforward. For the origin of the distribution, it’s easy to specify a S3 bucket, using Origin Access Identities allows you to keep the bucket private. The process of creating an SSL Certificate is quite simple, you just request one in Certificate Manager, create the CNAME records in your DNS hosted zone for validation, and it’s ready to be used in CloudFront. When the distribution gets deployed it’s time to set up the CNAME record in the DNS hosted zone so that it points to the distribution domain name (as I said I used my LightSail configuration). So when you visit the https://profile.cloudofthings.net you’re obviously getting responses via CloudFront distribution.

Final thoughts

That part was pretty easy since I’m experienced with creating and deploying services in AWS. I had lots of fun creating my website, I have to admit I’m happy with the result, even though there are lots to improve on. The most valuable thing I’ve learned from this part is the CICD process including GitHub Actions, it’s so easy and convenient to use!

Those are the steps of Part One. Time to move forward to Part Two and automate that process.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *