Into the Cloud: Embarking on a Journey of Skill Building and Self-Discovery, while also attempting the Cloud Resume Challenge.
Published: 2023-08-16 22:16:13

**Background:**
Just over a year ago, I decided to attempt the Cloud Resume Challenge. I’d been working as a Technical Support Engineer at a large company. This role provided exposure to a lot of various technologies, and was great for getting diverse experiences, but wasn’t quite as hands-on with the cloud as I wanted. I found myself being drawn deeper into cloud technologies and infrastructure as code, particularly AWS.
Out of curiosity I started studying for my AWS Solutions Architect Associate and later Professional Certifications. I had a lot of fun getting more familiarized with cloud technologies and doing some actual work with various AWS offerings beyond what I was touching through my job. I already knew that cloud computing was powerful, and not going anywhere, but I didn’t have the practical experience to really appreciate all that the cloud has to offer. After achieving those ceritifications, I knew I wanted to focus further on working with the cloud.
While researching what I could do next, I stumbled upon the Cloud Resume Challenge by Forrest Brazeal. The challenge offers a practical way of learning more about cloud technologies, and demonstrating that knowledge. I quickly decided it was worth my time to invest in completing the challenge.

For those not familiar, here are the requirements of the challenge:

Get an AWS Certification (already done!).
- Create a resume website using HTML.
- Use CSS for styling.
- Host the site using AWS S3.
- Use HTTPS via an AWS CloudFront distribution to securely serve the site content.
- Use a custom domain name and set up DNS using AWS Route 53.
- Write JavaScript to implement a visitor counter on the site.
- Set up a DynamoDB database to store the visitor count.
- Build an API Gateway and a Lambda function to communicate between the website and the database.
- Write the Lambda function in Python.
- Deploy the stack using Infrastructure-as-Code.
- Implement automated CI/CD for the front end and back end.
- Write a blog post about the experience.

To tackle these tasks, I followed Forrest's recommended methodology, dividing the build into four phases: Frontend, Backend, Integration, and Automation. Starting with the Automation phase, I manually configured all the services through the AWS Console. This approach allowed me to familiarize myself with each service's configuration and understand how they interconnected.

Throughout the challenge, I gained hands-on experience working with various AWS services, honed my skills in Python development, and familiarized myself with Infrastructure-as-Code principles. By following the structured approach, I ensured a smooth progression from building the website's frontend to creating a robust backend with a visitor counter utilizing DynamoDB. Additionally, I established communication between the website and database via API Gateway and Lambda functions.

As I moved forward, implementing automated CI/CD workflows emerged as a game-changer, significantly streamlining the deployment process. Leveraging Terraform and GitHub Actions, I achieved efficient and reliable deployments, reducing manual errors and downtime.

**Frontend:**
First, I decided to purchase a snazzy new domain name, cthompsoncloud.com. I then created a Hosted Zone in Route 53 to start my DNS configuration.

I created a basic HTML website in HTML and CSS. This was a fun exercise in refreshing what I had learned in College, after not having used either of these in a while. I’m pretty happy with how it turned out. And since I was already working on the Resume page, I went ahead and added a placeholder for the required visitor counter to the bottom of the page. I also started the JavaScript code to update the visitor counter on page load, all I needed to finish the code was the URL of the API gateway.

Once I had most of my website developed, I was eager to get it up and running on AWS. So, I uploaded all the code to my AWS S3 bucket. Now came the fun part – setting up CloudFront distribution. I had a little dilemma – I didn't want to make my S3 bucket publicly accessible, as AWS strongly advises against that too. So, I decided to go with a more secure approach – Origin Access Control (OAC).

Configuring OAC was pretty straightforward, and it's actually the recommended method for setting up origins in CloudFront. AWS even guided me on creating the right security policy during the CloudFront setup – very handy! I also wanted to add some extra security to my domain, so set up an SSL certificate using AWS Certificate Manager. Once that was all set, I integrated the SSL certificate with CloudFront.

Next, I set up an alias for my domain and pointed it to my CloudFront distribution. My frontend was now live and protected according to AWS Security best practices, big check mark.

**Backend:**
Moving on to the backend, it was time to tackle the visitor counter. The challenge was to implement it using API Gateway, a Lambda function, and DynamoDB. The cool thing was that the challenge recommended using Python for the function, which added a nice smattering of coding to the project. Plus, I'd been working on improving my Python skills, so this was a perfect opportunity to put them to the test.

To start, I consulted the AWS docs and found the AWS SDK for Python, AKA Boto. I got to work crafting the visitor counter function. I watched some nice tutorial videos by Johnny Chivers, showcasing Dynamo DB and using Python to interact with it. Armed with this knowledge, I was able to get a my visitor counter function working. 


With the Lambda function all set and working, it was time to set up the API Gateway. A bit more time spent reading documentation and playing around and I had a functioning API for my visitor counter. I then integrated this into my webpage.

Seeing everything fall into place in the backend was incredibly satisfying. Now, my website had a working visitor counter that could accurately track page views, thanks to the power of Python and some AWS magic. Onward and upwards!

**Automation:**
Automation is a game-changer these days, as such I wanted to add an element of this into my project. Now I have come to appreciate its power in minimizing errors and boosting efficiency. Also it looks really cool to see everything just spring into existence.

At first, I explored different options for automation. Since I was working with AWS, CloudFormation and AWS SAM were on the table, but then I noticed that Terraform was making waves in the tech world, especially in job postings. After looking into it, I saw why Terraform was gaining popularity – it's flexible and works seamlessly with multiple cloud providers, avoiding any vendor lock-in. Plus, it boasts an extensive library of modules that extends its capabilities, I also saw that I could combine this with GitHub actions. – perfect for my project.


I focused on each AWS service in my stack and set up dedicated Terraform configurations for each of them. Thanks to Terraform's well-documented nature and powerful modules for AWS, this was much less arduous then I thought it would be. I planned and deployed my configurations, continuously comparing them to my manually configured stack. Over a few days of hard work, I had my Terraform configurations nailed down, creating a full-fledged cloud resume stack.


**Final Thoughts:**
The Cloud Resume Challenge was a fun challenge. I got to dig deeper into a lot of popular AWS services, and finally familiarize myself with Terraform. The challenge has provided a great platform to further improve my cloud skills and I would recommend it to anyone with an interest in that area!