From Aspiring to Achieving: My Journey Conquering the AWS Resume Challenge
Tags: serverless, aws, terraform, computerscience
Published: 2023-12-22 04:02:14

Hello there! I'm absolutely thrilled to share my proudest project to date – my take on the Cloud Resume Challenge by Forrest Brazeal. Before we dive into my journey, let me introduce myself. I'm Andrea, residing in the greater Palm Bay-Melbourne area of Florida. I graduated from the University of Florida in May 2023 (Go Gators!) with a Bachelor of Science in Animal Sciences and a minor in Economics.

Now, you may be wondering how someone with a background in animal science has since found their way into the tech world. To meet the requirements for my minor in Economics, I enrolled in the only class that fit into my last semester schedule- 'Economic Analysis of Data'. This course, centered around R programming, introduced me to the world of coding. Since then, my curiosity has led me down a rabbit hole, guiding me on a path to transition into the IT industry.

Surprisingly, this year has seen me not only breeding my first horse for a class, but also constructing CI/CD pipelines for my website! The former is a story for another time... let's dig into the latter!

## The Objective

The goal of this project is to create a dynamic resume website with a sleek front end, accompanied by a visitor counter on the back end. The visitor counter should be displayed on the website. It incorporates Infrastructure as Code (IaC) for the backend services, as well as CI/CD pipelines for both backend and frontend source code, automatically pushing changes to AWS. This project mimics real-world scenarios, providing an opportunity to delve deep into AWS services. More information can be found [here](https://cloudresumechallenge.dev/docs/the-challenge/aws/).


![Diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a0u35awb26yue6nwwxh7.jpeg)



## My Take

One of my favorite aspects of this project is its versatility and the numerous avenues for customization. I decided to go the extra mile by putting not only the backend services into Infrastructure as Code but also the frontend resources, all within Terraform. Initially, I completed the project using clickops, then went back and migrated everything into Terraform. I completed this project over multiple months, aligning it with my studies. Below, I will briefly go over how I tackled each portion.

**_The HTML/CSS part_**

Before ever learning about the Cloud Resume Challenge, I initially embarked on the **100 Days of Code: The Complete Python Pro Bootcamp for 2023** by Dr. Angela Yu. I accumulated several Python projects that I wanted to showcase, so I started an HTML+CSS portfolio website. 

Admittedly, at the time, HTML and CSS were alien concepts to me as I was just beginning Python. So, in my eagerness, I used a free template by ThemeFisher, tweaking it to fit my vision.  At this point, before even beginning, _I have my portfolio website complete_.

**_The S3, Route53, CloudFront, & HTTPS part_**

After earning my AWS Certified Cloud Practitioner certification, I delved into Adrian Cantrill's **AWS Certified Solutions Architect - Associate (SAA-C03)** course. During it, I also started looking for more AWS-focused projects to further hone my skills, and that's when the Cloud Resume Challenge caught my eye. 

This project seamlessly complemented my ongoing studies. Thanks to Adrian's course, I already had _my portfolio website hooked up to a domain name via Route53, distributed through CloudFront, secure with HTTPS through a certificate in ACM, and my files stored safely in S3._ Onto the backend!

**_The Lambda, DynamoDB, and JS part_**

Next, the challenge led me to the DynamoDB and Lambda portion. With limited experience in Lambda beyond the simple 'hello world', I decided to delve into the Lambda console. I even wrote a tutorial [for sending automated emails through Lambda](https://dev.to/andreapeterson/send-automated-emails-smtplib-python-through-lambda-15jk).

Also wanting to dive deeper into Boto3, I subsequently took **AWS - Mastering Boto3 & Lambda Functions Using Python** by Hari Kammana on Udemy. Then, I felt extremely confident and conquered this portion of the challenge. The Lambda code took shape, enriched with [atomic counters](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html#WorkingWithItems.AtomicCounters), seamlessly connecting with the DynamoDB table. 

Finally, I updated my website code to include Javascript to display the view count. Choosing Lambda's function URL over the conventional API gateway, I linked it to my homepage. _Now, each load on my home page triggers  Lambda, instructing the DynamoDB table to increment by 1, and the freshly minted view count is shown on the home page._

**_The Terraform and Github Actions_**

Finally, onto the last portion- the IaC and CI/CD chunk. I chose Terraform over CloudFormation due to its versatility across cloud platforms. Like most of this project, I started slow with Terraform's basics just to learn the lay of the land, [initially creating an EC2 instance and gradually incorporating more features](https://github.com/andreapeterson/terraform-beginner), rather than jumping right into incorporating Terraform into my project. 

After I felt comfortable, I transitioned my backend services—Lambda and DynamoDB—into Terraform. Then, added my frontend source code to a Github repository with Github Actions, ensuring each commit to AWS. Yet, as I reached what I believed to be the final step(adding my Terraform code to a Github repository+Actions), a realization struck. Only half of my project is automated, which is a vulnerability in disaster recovery scenarios. Moreover, the dependency of my frontend JavaScript file on the backend Lambda function URL presented a manual intervention hurdle.

Choosing to face the challenge head-on, I made the decision to encapsulate everything within Terraform, resolving the dynamic function URL dilemma. The manual touch persisted only in crucial areas—my domain name within Route53, the certificate in ACM, and the reserved S3 bucket name mirroring my domain name. I fetched these items dynamically in my Terraform file using data blocks. 

Finally, I added these files into a [Github repository ](https://github.com/andreapeterson/aws-CRC) and set up Github Actions, triggering Terraform apply with each push to the main branch. The state file is stored remotely in S3.

_Behold the culmination of this grand endeavor in all its glory:_ https://andrea-peterson.com

## Conclusion

In conclusion, conquering the Cloud Resume Challenge proved to be an immensely rewarding experience defined by persistent problem-solving. The tech industry's vast support network, encompassing abundant resources like StackOverflow, YouTube tutorials, and insightful blog posts, played a pivotal role in navigating and resolving the challenges encountered. While I'd love to go into depth over every little problem encountered, the truth is I'd be writing this well into the greater part of 2024 with the amount of problems that occurred. Nonetheless, I did keep a Google Doc serving as a repository for the challenges that kept me awake for some nights—a testament to the learning process.

Overall, Terraform was my favorite aspect of this project and the area where I witnessed the most personal growth. Coming into this challenge, my knowledge of Terraform was limited to its benefits; however, by the project's end, I had completed the entire challenge within it. This underscores the transformative power of hands-on learning.


## Future Plans
Looking ahead, I plan to expand on this project. Currently, I am gearing up to take the **AWS Solutions Architect Associate exam** and am also exploring Docker, Kubernetes, and more Linux. The road ahead promises new challenges and discoveries, and I am eager to embrace them with the same enthusiasm that fueled this Cloud Resume Challenge conquest.