The Cloud Resume Challenge: My Experience
Tags: aws, cloud, serverless, challenge
Published: 2021-02-03 22:03:43

[The Challenge](https://cloudresumechallenge.dev)
[My Cloud Resume](resume.kyronmckenna.com) 
***


# **A little about Me:**

I'm an up and coming DevOps Engineer. I found an interest in programming in my early years(12-15 years old) and dropped it off to pursue a Nursing degree. Over time I found myself wondering if I had made the right decision as I've always been fascinated with computers, networking, and programming. There's no better feeling than spending hours upon hours working at something and it finally clicks. So here I am now, back to what I truly love doing. I will admit, coming back after such a hiatus left me a bit rusty, but nothing I wasn't able to catch back up on quickly.

I started out looking where I should start this new career path and stumbled upon AWS and set out to achieve the **Certified Solutions Architect - Associate** certification. Within a month of studying I had passed the exam. Shortly after, I decided to go all-out and tackle the highly prestigious **Certified Solutions Architect- Professional** certification. Three months later of LOTS of hours of studying and playing around within the AWS console I had achieved my goal and held the certification.

I then started looking at projects I could complete to solidify my knowledge and ability to navigate through AWS and I stumbled upon the [Cloud Resume Challenge](https://cloudresumechallenge.dev) by Forrest Brazeal, so I added it to my to-do list and got straight to it. The tasks of this challenge are no easy feat, even for a SAP, but with grit and determination it's do-able. I highly recommend anyone looking to break into AWS to give this challenge a shot. It covers multiple services and features of AWS that anyone looking to get into the field should know.

***

### The Challenge:


Build a website on AWS to host your resume along with a visitor counter. [Visit the official Cloud Resume Challenge homepage for more information](https://cloudresumechallenge.dev)
**1.** Obtain the AWS Cloud Practitioner Certification.
**2.** Write a format of your resume in HTML & CSS.
**3.** Deploy your resume as a S3 static website, use HTTPS and Amazon CloudFront.
**4.** Point a custom DNS domain name to your CloudFront Distribution.
**5.** Add a visitor Counter to your website using Javascript.
**6.** Setup a DynamoDB database to log the visitor counter.
**7.** Create an API to communicate your javascript code with DynamoDB.
**8.** Create a Lambda function using Python, triggered by your API Gateway, that reads from the DynamoDB table and updates the visitor counter. Create tests for your Python code as well.
**9.** Write it all as Infrastructure as Code using SAM.
**10.** Setup two GitHub repositories, back-end and front-end, for your code and use GitHub actions to automate updates and deployment.
**11.** Finally create a Blog Post about your challenge.


***

## Let's get into it



### Resume - HTML & CSS
I initially created a resume with HTML & CSS pretty easily, having prior experience definitely made this quick to do, but I didn't really like the look I had going. It seemed too bland for what I was after. Honestly, creativity when it comes to creating something super pretty like a resume isn't my best skill. I searched the web for something I could tailor & edit up to fit the look I was going for. 

### Static S3 Website, HTTPS, and CloudFront, Custom Domain
I feel my prior AWS certifications allowed this part to be a breeze to setup. Create a bucket, upload your files, enable static web hosting, use AWS Certificate Manager(ACM) for the SSL certificate, and then setup a CloudFront distribution. Use Route53 for your custom domain needs to align with your CloudFront distribution.

### Adding a Visitor Counter with Javascript
This part stumped me for a bit. I'm not too familiar with Javascript, but nothing a bit of research online can't solve. I did however have issues later on with API Gateway and my visitor counter, through troubleshooting I narrowed it down to CORS not being enabled properly. Make sure to setup CORS.

### Setup your Back-end: DynamoDB, Lamdba, API Gateway
Set up your DynamoDB table with on-demand pricing and it's basically free to use.
I wrote my Python script and threw it into Lamdba, tinkered with it a bit and got it working. I think this is really where I started loving AWS and Lamdba. 
Next up create a trigger for your Lambda function with API Gateway, I found REST APIs worked.
**TIP:** Don't forget to assign the correct IAM Role/permissions to your services.

### Tearing it down, making your Infrastructure as Code
Now this part was where the real fun began. Anyone can tinker around manually for a while and get things to route and function together. You can spend 20-30 minutes manually doing everything, OR you can rewrite your Infrastructure as code and have it ready to deploy at a moments notice. Using CloudFormation for this step is one's first thought, but Forrest requires you to use AWS Serverless Application Model (SAM). I hadn't really touched SAM much before this, but WOW it's powerful. **You can scale a 100+ line CloudFormation template down to 20 lines of code using SAM.** Note that SAM does run off of CloudFormation in the background. This was definitely at the top of my learning for this challenge, I'll be sure to leverage SAM where I can.

While building with SAM I initially used Docker to build my app in a container, it made getting a feel for SAM simple.

**TIP:** You'll need to put the correct headers in your Lambda return. It took me awhile to figure out why my visitor counter wasn't showing on my resume website.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/x0srx55fu0wqom89a181.png)


### Setup your GitHub Repositories
Pretty self-explanatory and simple. Use GitHub actions for CI/CD. Edit your code as necessary and commit changes and push to your repo for updates on the fly.


## Ending thoughts
I really loved this challenge. It was a perfect blend of AWS services and led to a purposeful project. For an additional challenge you could even write your front-end infrastructure as code.
There were some parts that stumped me for a bit, primarily getting SAM and CORS enabled correctly. If you're tackling this challenge and haven't yet joined the [Cloud Guru Challenge Discord](https://discord.gg/MSzJsvHF) ran by Forrest, I suggest you do. 
New to the whole blogging scene, but I like it, it allows you to reflect on the things you've learned. I'm going to try to set out a goal to write about my learning more frequently.

***

[Finished Product - My Resume](resume.kyronmckenna.com) │ [GitHub - Front End](https://github.com/KyronMcKenna/Cloud-Resume-Front-End) │ [GitHub - Back End](https://github.com/KyronMcKenna/Cloud-Resume-Back-End)

***

Feel free to reach out to me here or in the Discord group if you need help with your Cloud Resume Challenge!