DEV Community

Sanoop
Sanoop

Posted on • Updated on

A resume in Cloud.

Having just finished my AWS CCP and SA associate certifications, stumbling upon the cloud resume challenge was a happy coincidence. The certifications had given me a good overview of the cloud technologies and their usage but it felt that to really get into the thick of it, I would need something much more comprehensive. Cloud resume challenge has been a blessing in disguise in that regard, shout out to Forest Brazeal for creating it and the community built around it. This blog is my journey through the steps involved, the bottlenecks and those delightful ‘Aha’ moments where things just clicked.

Setting Up the HTML resume & hosting it as a static website

This was the next step after certification. I had some experience with HTML & CSS before but went with a template online to focus more on the actual cloud tasks. I moved a lot of pieces around on it; adding pictures, custom css, certifications logos and links to my socials. Once I had something that I liked, the next step was to host it as a static website on Amazon S3. From setting up the bucket policy, making it public with least privileges and hosting my resume was all pretty straight forward. So far, so good!

CloudFront Distribution & Domain Setup

Next up, we needed the website to be a secure using a CloudFront distribution. I decided to go ahead with setting up a domain on Route 53 first. The one with my full name was available, so yay! Next step was getting an SSL certificate for the distribution and then linking the domain and my cloudfront. That went smoothly too, last step was to finally link my website endpoint and CloudFront.Voila…in a couple of minutes, I had an https website with my name and resume. I Kept loading and refreshing my page a couple of times, cause it was fun and why not.

Visitor Function (A dive into serverless)

The site needed a visitor counter, the database of which needed to be in a Dynamodb table and pulled using a lambda function. Since I had worked with Python, I was excited about setting up the Lambda function. Dynamodb, however, with it’s various complexities was no cakewalk, so much devil in the detail. I needed to understand the key structure, how primary keys work with sort keys, and how reference to the table needed key a specific pattern to fetch the data.Python’s boto3 module and it’s resource functionality worked like a charm.

Adding an API to invoke the function was easy. All should be well right? Nope! The API just wouldn’t work, no matter what I tried, the page just wouldn’t fetch the data. This was my first brush with the dreaded ‘CORS’. I spent a few days just scratching my head, looking for answers. What solved the issue was a thread I found where the easy enough fix was to pass the CORS headers in the Lambda itself. Thank you Stackoverflow!

AWS SAM

I had just got everything working and now we had to destroy everything, all part of the learning. The backend up till this point was going to be redefined in a SAM template. I did run into a few issues with the template. There is a learning curve to being able to properly define resources. After a couple of tries, I had a working template but after deploy it wouldn’t link my Lambda and the table. Figured out I needed to use environment variables in my function and template to have them connect properly. This took a good number of Deploy and Destroy cycles till the final perfect one where without moving a finger in the console I had a working app. Very close to the finish line now!

CI/CD Pipeline with Github actions.

By this point I had built and tore everything down so many times that I was looking forward to this last time. The final step needed a CI/CD pipeline to automate our deployments. First step was to make repositories for both ends. Syncing the front end resume with the S3 bucket was easy as there were plenty of custom yaml templates available to achieve it. I had to add some arguments though to make sure only new changes get pushed.
The backend was a bit more complex, the actions yml template for SAM deploy needed to be customized to run my Unit tests first. Building the tests and modifying the template was a fun learning experience. It was time to run the template, fingers crossed….aaaandddd it failed, failed more times than I’d like to admit. A couple minutes of tinkering around and it was my syntax in the main yaml that needed fixing.

The End

And then the most satisfying moment happened; I threw my chair back while watching this unfold with a smile.

newtest

Final Resume

All in all, this challenge has been an immensely enriching experience. I had major imposter syndrome after clearing the certifications, a feeling that I only knew things on the surface. A deep dive challenge like this has helped curb so much of it, there is truly no substitute for hands on experience. It’s given me the confidence to move forward on this cloud journey.

Top comments (0)