My First AWS Project
Published: 2021-05-17 19:05:02

I recently passed my AWS Solutions Architect Associate exam but didn't really have any practical experience, so I wanted to gain some insight by taking up on a personal project. After doing some searching, I came across this <a href="https://cloudresumechallenge.dev/">Resume Project</a>, and in this post I wanted to share my experience working on this project and some key takeaways. 

In order to start the project you need to be AWS certified, which I am and noted on my resume. 

<h2>FRONT END </h2>
The Resume needed to be written in HTML and styled in CSS. I am by no means a web designer so I went ahead and used a template that I found <a href="https://trendytheme.net/best-free-html-resume-templates-to-download/">here</a> and made some slight modifications to tailor to my liking. 

Once the resume was built, it was time deploy it online using AWS S3 static website. So I created a bucket, added permissions, enabled static web-hosting, and uploaded my files and turned on static website hosting.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4cnpyvx0q15t2nq5ozup.png)

It was instructed that I use HTTPS for security so I used AWS Certificate Manager to request and receive SSL certificate to secure my website. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/akt85l0y4u38x00b0loj.png)

Next, I needed to point a custom DNS domain name to CloudFront Distribution. So I created my CloudFront distribution, attached my certificate from Certificate Manager, and purchased a domain on Google Domain for $12 and added my domain name to CloudFront. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vnrijp5uaz115i11efjp.png)

Additionally, I wrote some JavaScript to include a website visitor counter but ultimately made the decision to not display this on my website since it looked visually unpleasing and just stored the value in the backend which I will discuss below.... 

<h2>Back End - this is where things got a bit tricky... </h2>
For the back end portion of this project, I needed to create a database, an API, and lambda functions written in Python to store and retrieve the results of my website visitor counter data. But instead of creating everything manually by clicking through the AWS Console, I needed to use Infrastructure as Code AKA AWS Serverless Application Model (SAM). 

Basically, SAM allows you to create serverless applications with minimal code using a template - AWS definition: "The AWS Serverless Application Model (AWS SAM) is an open-source framework that enables you to build serverless applications on AWS. It provides you with a template specification to define your serverless application, and a command line interface (CLI) tool." 

After banging my head for a few days trying to figure out how to deploy my serverless applications on AWS using SAM, I came across this godsend of an article by <a href="https://blog.heyitschris.com/posts/get-your-foot-in-the-door-with-sam/">Chris Nagy</a>, that breaks down SAM in a very simplistic and easily digestible way! After playing around with SAM for a while, I was able to successfully deploy my DynamoDB, API, and Lambda functions all with the correct permissions and policies to allow communication with each other.

Now that I have all the appropriate applications in place, I decided to leverage the Atomic Counter function in DynamoDB to update my website visitor counter. I wrote some JavaScript code on my frontend that would send a request to my API which than triggers the Lambda Function (written in Python) and increases my counter value in DynamoDB! 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ze9uk0xucbugw42vc7p6.png)

<h2>The Homestretch</h2>
My Resume App was finally coming all together! But before I could sign-off on it there were a few things remaining. 

I had to create a CI/CD for my project by setting up GitHub Actions so that every time I would push updates to my GitHub, it'll automatically push the changes to my AWS environment. This part wasn't terribly difficult and I was able to look up some instructions online and successfully implement CI/CD for my project!  
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6yvtb8aclb8r7qvnlofy.png)

With that completed, I have met all the technical requirements for the project which can be viewed <a href="https://bhtresume4u.com/">here!</a>

<h2>What I Learned</h2> 
This experience has been extremely challenging but also very rewarding. I spent countless hours going down the google rabbit-hole, furiously reading through articles, digging into stack overflow, and reaching out to the developer community. This project has really allowed me to grasp the fundamental concepts of AWS/cloud as well as familiarize myself with some of the most commonly used services in AWS today.

As I continue my journey in the Cloud, my next step is to work on more projects that will elevate my skills! I would like to work on a project that requires database migration from on-prem to cloud as I have found networking (VPC) to be an interesting topic. With that being said, thanks for taking the time to read my blog and feel free to check out my <a href="https://bhtresume4u.com/">website</a>! 

P.S. Feel free to reach out to me if anyone reading this would be interested to work on a project or discuss anything Cloud related!