My Thoughts After Completing the "Cloud Resume Challenge"
Published: 2020-07-13 00:18:09

When COVID-19 hit at end of March I was in school finishing up my last semester for my finance degree. Without having a job lined up after graduation and knowing that the job market is in decline, I wanted to learn something new. After doing some research, I decided on learning AWS. I started off by buying Stephane Maarek's three associate courses off udemy. I studied and passed the exams for the solutions architect, developer, and sysops in that order. After completing the last of the trifecta, I needed to find some projects to complete to fill in the gaps of my resume.

While browsing /r/awscertifications somebody recommended the "Cloud Resume Challenge." This challenge took about a week to complete. This was a great learning experience since I have never coded in javascript or python or dealt with any serverless architectures in AWS before. It was helpful that I took a couple years of java in high school so that I was somewhat able to understand and write basic functions in javascript and python.  I'd like to share some of the problems I came across and how I solved them.

The challenge can be found [here](https://cloudresumechallenge.dev/instructions/)

skip step 1
###Step 2-3: HTML and CSS
These steps say to use html and css to make the front end of the webserver. I originally used codepens [default resume](https://codepen.io/emzarts/pen/OXzmym) as a base to have something to show. I came back to these steps after I completed the rest of the steps.
###Step 4: Static S3 Website
In here I knew to uncheck the "Block all public access" box in the bucket permissions and enable static website hosting in the properties. I did not know that I had to assign a public policy to the bucket. Thankfully I found the steps in this [aws documentation](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/static-website-hosting.html).
###Step 5-6: HTTPS and DNS
Honestly no problems here
###Step 7:
This was my first time writing something in javascript. For the most part I had no problems googling and finding a way to extract data from an api. 

These videos by The Coding Train helped me understand how fetch works and how to use data sent from an api.
[video 1]{% youtube tc8DU14qX6I %} 
[video 2]{% youtube uxf0--uiX0I %}
###Step 8-10: Database, API, and Python
These steps wrap together DynamoDB, API Gateway, and Lambda to return a viewer count. According to step 12, I had to include all three of these resources in a SAM template. I first started off by copying the hello-world SAM template which included the template.yaml for a lambda function and API. It also included a python function used by lambda. I had to make some edits to the permissions of the lambda then I just added a DynamoDB table to the template. [DyndamoDB cloudformation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html)

This was my first time ever dealing with a yaml document. It took me about a day trying to figure out how yamls were formated and how to read documentation on all the resources. I also ran into a problem with cors when I tried getting the number of views from my api. My browser was telling me that I needed to have certain headers for cors to work. I thought I had to make a global default in my template to allow for cors and then I allowed for the headers the error in the browser gave me, but I still had the same problem. I was stuck on this problem for a day, until I came across a "how to" post on google which returned a headers key and value in the python function. After implementing this, my error was gone. 
![](https://i.imgur.com/ZbUh2dU.png)
###Step 11: Tests
My python test would compare the output of my lambda function and to what is in the DynamoDB table. If the numbers were the same, it would pass the test.

I had a big problem with understanding the difference between python dictionaries and json. As I said before I'm a newbie when it comes to python so this kind of stuff is tricky for me. This stackoverflow image helped me get a better understanding between them ![](https://i.imgur.com/sSz6WFe.png)
###Step 12: Infrastructure as Code
SAM
###Step 13: Source Control
This step asks for us to put all of our code and resources into a github repository. I had never used github before so I looked up a video to help teach me. {% youtube 0fKg7e37bQE %}
###Step 14-15: CI/CD
These steps asked to use github actions to help automate the deployment to the backend and frontend. I used the github marketplace to find all the workflow jobs needed for deployment.
##Conclusion
I ran into some hiccups along the way, but Googling and Youtube tutorials really helped me get through. If you are someone looking to get into aws, I definitely recommend the Cloud Resume Challenge. You will learn so much more that's not on the aws certification exams.

[My Resume Website](https://alexdziarnowski.com/)

Alex Dziarnowski