2 months into cloud: My First Cloud Project
Tags: cloud, aws, webdev, terraform
Published: 2022-12-06 10:51:56

**Summer 2022**, I graduated from university. At that time I didn’t know which field of study exactly did I like. At least I knew that I enjoyed coding, everything about it: from the satisfying clicking sound of the keyboard to the victorious feeling of solving an error (with the exception of a missing semi-colon). Too bad coding itself was too broad, I had to find what specifically I wanted to do for the rest of my life with it. 
 
While browsing YouTube and watching videos as I do most of my free time (not exactly "free time", I watch podcasts and documentaries while working out, having a shower, before bed, while eating…), I came upon a video briefly talking about Cloud computing. I found it really intriguing how much we use cloud without even noticing it, and how fast companies are migrating towards cloud. Being the curious person I am, I decided to take a Udemy course on AWS and serverless computing. It really helped me set a good basis on AWS services, and made me realize that I actually love working with the cloud, it combined the two things I want to be able to do: coding creatively and seeing visual results.
 
Then in my quest on finding a good project to practice my cloud and AWS skills, I came upon a Reddit post suggesting a book called The Cloud Resume Challenge.
 
TLDR; the challenge was to build your resume as a website, host it on the cloud, and implement CICD features to automate deployment.

**The Challenge:**
  It consists of:
   •	**HTML-CSS**: The resume needs to be written in HTML and styled with CSS.
   •	**Static S3 Website**: The HTML-CSS need to be deployed to          
an S3 bucket as a static website.
   •	**HTTPS** for security
   •	**JavaScript**: The website should include a visitor counter.
   •	**Database**: The counter retrieves and updates in a database.
   •	**API-Lambda**: The API will trigger a Lambda function that will retrieve the data from the database.
   •	**Tests**: Automating the testing of our webpage and counter.
   •	**Infrastructure as Code**: Using an IaC tool to deploy everything we've done so far instead of the web interface.
   •	**CICD**: Using GitHub Actions to automatically run the tests and deploy the changes to AWS each time we update the code.
 
Skimming further through the book, I started to feel how this is more than just a project to add to your resume. I realized how this would be the first cloud project that would actually make me confident in what I know about the cloud. Even further, participants in this challenge can network, chat, and support each other through a discord community. So I decided to join…
 
Going through my journey with each step of the challenge:
 
**HTML-CSS** was one of the most encouraging sections of the challenge because it really pumped me up to continue. Why? Because I had very little experience with HTML-CSS, and after watching one YouTube video (not even completing it) I was able to design my website in HTML-CSS. It's so fun as a matter of fact. I was able to replicate my pdf resume into a website. Once I learned about 'divs', I decided to give it a shot and start writing the HTML-CSS code. It took me 2 days to execute. 
 
Now deploying my front-end code to an **S3 bucket**. I had previous experience with S3 from a Udemy course I took earlier "Building a Serverless Chat App with AWS Lambda - Hands On!" by Sundog Education. So I was able to walk through this part with no major troubles. 
 
To the more interactive part of the challenge, incrementing a visitor counter in a **Database**. I also had previous experience on **DynamoDB** from a Udemy course by RIZMAXed. So using the APIs wasn’t an issue. I made sure the table was done in the simplest way possible, what's left was to implement the JavaScript code in **Lambda** with all the permission issues using **IAM** policies.
Oh and I didn’t use python as the challenge suggested, I decided to expand my JavaScript skills as most of my previous experience was in python.
 
**API** was probably the most frustrating bit of the challenge, so many errors and so much time spent reading docs and stackoverflow to figure out the issues. CORS was my enemy for this part. So the relief watching it work was so good. 
 
**Infrastructure as code**; a concept I first thought was very time-consuming, until I wrote my **Terraform** code, and realized how I could deploy in 10 minutes more changes than 1 hour of web console point-and-click could. So, I repeated the deployment I previously did this time using terraform. Beyond the challenge, I even wrote IaC for my S3 bucket, this will later help me deploy changes in my front-end code as well.
 
Onto the tests and using **Cypress**, which was one of coolest tools I've seen; well documented, with a very high level version of JavaScript that it almost feels like reading plain English. The test loads the resume webpage, refreshes it and checks if the visitor counter increments.
 
Finally, to automate the process of testing and deploying, or in fancy terms CI/CD, I created a **GitHub** repo with two workflows: testing and deployment, where the deployment process starts only when the tests return success. 
 

**Finally...**
This really didn’t feel like an internet challenge I randomly saw. It rather made me feel like I'm working on a career project. What I like more is that I never felt forced to do any of the steps. I actually enjoyed them!
This made me sure that cloud computing is definitely a field I would love to work on for a career. 
I indeed feel excited for the future of cloud and eager to witness and contribute to the technologies that will arise in the upcoming years.