Diving Deep Into AWS For The Cloud Resume Challenge
Tags: cloudresumechallenge, aws, serverless
Published: 2022-01-13 16:06:40

To get more experience with AWS and serverless apps, I went through many of the AWS hands-on tutorials. They are good for showing what all might be involved in getting an application to the cloud, but the details tend to get passed over because they are automatically handled for you. I wanted something more demonstrative that could prove my skills and carry more weight on a resume. Luckily I came across a video by Forrest Brazeal (who created the Challenge) in which he dispenses very practical advice about networking and resumes. So here I am today, having completed the Cloud Resume Challenge. My website is at https://markgordon-resume.com.

The goal of the project is to post a resume online. But there are several neat things about it. One, it is “serverless” – the HTML and CSS are hosted in an Amazon S3 bucket. A Javascript web counter uses a NoSQL database, REST API, and Python function to update the visitor count. The resources get deployed by a Serverless Application Model (SAM) template, which is triggered by GitHub Actions whenever repository code is updated. That adds up to a whole CI/CD pipeline in itself. Pretty neat. All 16 steps are outlined here: https://cloudresumechallenge.dev/docs/the-challenge/aws.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dl3xi1qv05eqvgdg4a30.jpg)
My approach to the Cloud Resume Challenge was the same as it is to anything I do: I like to be thorough and I don’t like to give up.

There are times when you need to make something work, so you do whatever you have to do to get it to work. But then you see that there are other ways, and it is the discovering of _all_ of the possible ways to do the same thing that will make you a powerful developer. Try every option, so that you know not only what works but what doesn’t work.

I often find I need to scale back to the most minimal amount of code to get something to work, and then build up from there.  

**Certifications** 

I first started working with AWS services in 2018. As a developer, I used EC2, RDS, and VPC to create and manage the infrastructure of our dev, staging and production server environments. I really liked working with AWS and wanted to learn more. It seemed like Amazon had it all figured out and well documented. So after working with AWS for a couple of years and getting real world experience, the idea of getting certified really appealed to me. I decided to go for the Solutions Architect Associate. I did not pass the first time. After watching 30 hours of videos, I had unrealistic expectations. So I doubled down, studied twice as hard, and I passed the second time. I knew myself better and knew what it would take to pass. In 2021 I passed the Sysops Administrator Associate exam. 

**HTML/CSS/Javascript**

No problem here – been coding with these for years. Invoking the API presented a bit of a challenge in that there are several ways. So which is best and which takes the least amount of code?

**S3/Cloudfront/Route53**

Also quickly done, as I’ve had previous experience setting up DNS for multiple domains. Choosing a good domain name was the challenge here.  

**API/Lambda/DynamoDB**

Troubleshooting the counter that only refreshed after a five minute delay caused me to do a deep dive into nearly all of the possible configuration options available in API Gateway (including the three different types of API). I also took a deep dive into the Lambda execution environment and life cycle. Having this extra thing called the Lambda handler was something I did not want to deal with much at first. I would have preferred just the Python code. But now that I know all that’s useful to know about it, I no longer fear the handler part. I’ve also learned how important it is to be _idempotent_.

**SAM Template/CI/CD/Tests**

The SAM template was the most zen-like part and the most fun. I kept cutting out whatever was not required to see just how much of a bare minimum I could arrive at. If it wasn’t required and the default was what I wanted, that’s how I left it.

There were several gotchas at this stage – one being that the SAM template only creates one role – for the Cloudwatch logs. It still needs permissions for the Lambda function. Other gotchas were getting the key schema correct and CORS. I had to learn that the SAM API is a proxy to Lambda and how that might differ from a REST API.

I found inconsistencies in AWS’s YAML examples – sometimes single and sometimes double quotes – and sometimes both, nested inside each other. There again I had to arrive at the best choice while using the simplest.

I was so into using the SAM template to deploy resources that when it came to deploying the front end of the website, I overthought it. I automatically thought two repos, two templates. I had to step back and take the broadest view of what I needed to do (which was: _how do you deploy_ an update to an object in an S3 bucket?), instead of focusing on which properties and commands should be used in the template.

Learning how to set up Cypress tests felt like it was going to be as much work as everything else, but after it was done, I gained a lot of confidence in the end to end functionality of the app.

**Summary**

Getting everything to work correctly required the kind of knowledge that’s very different from the knowledge it takes to pass a cert exam. The knowledge imparted by real experience stays with you; its close to the bone.  I made lots of mistakes – but I am proud of them, because it is from correcting your mistakes that you really learn.

And now that its over, its amazing how easy it all seems ;-)

This was a very valuable experience. It fits right into my career as I am using CI/CD pipelines with integrated testing more. At my last job we didn’t use them at all. Now, along with building some projects in Docker and training in DevOps principles, I know I am ready for the next big opportunity.