DEV Community

Cover image for Hands-On Approach with AWS Cloud Resume Challenge
Marcos Ferrero
Marcos Ferrero

Posted on

Hands-On Approach with AWS Cloud Resume Challenge

At this stage in my life, I decided to switch careers to focus on the Tech world and what it had to offer. I enrolled at Miami-Dade College with basic knowledge of Cloud Computing. I knew coming into this new world, I had to take a hands-on approach if I wanted to succeed in this new career.

By attending classes, studying, and exposing myself to the unlimited resources, I became a certified AWS Cloud Practitioner (September 2021) and AWS Solution Architect (April 2022). One of my first projects that I was tasked with was the Cloud Resume Challenge by Forrest Brazeal.

Starting the Challenge -

Front end- HTML / CSS

I found a Bootstrap template I liked and modified it to showcase my projects by removing additional pages and links. I tried to keep it as simple as possible. I didn't have previous experience in HTML/CSS; therefore, online resources helped me with editing the template. The HTML page would also include a JavaScript snippet which updated and fetched the visitor count from the "back end."

Static S3 Website

Based on the knowledge I gained with the unlimited resources
and preparing for the AWS certifications, I learned how to host a static website on S3 and using CloudFront for content distribution. I purchased a domain name using AWS Route 53 and configured it to use the CloudFront distribution. Also, I made use of AWS Certification Manager (ACM) to procure an SSL certificate for the site.

Back-end

DynamoDB

I had some knowledge of DynamoDB but very little practical/hands-on experience. I created a Table with a Partition key (date) and an attribute count. Each day, the webpage has a certain amount of visitors. The code to retrieve items from a Table and to update the count, I searched it online and found the code for Python.

Lambda

The Lambda function was also challenging for me because I had no experience. After researching, I created a function with Python code to update the count in the table, and at the same time get the count number. I added the IAM role for the function to access the DynamoDB table and tested that it was working.

API Gateway

Another services was new to me but I was determined to learn it. I had to familiarize myself with the concept of an API in which I was able to understand its goal and function.
The API Gateway exposes a REST API Endpoint, which will be called by Javascript snippet embedded in the front-end html page, on every page visit/refresh - to update and fetch the visitor count from a DynamoDB table, through Lambda function. Enabling CORS (Cross-Origin Resource Sharing) on the API Gateway resource is mandatory to fetch the response back, when it is called.
After this, the backend was done. I could call the API link, this triggered the Lambda function, which increased the count by 1 and returned the value.

Tests

I had previous experience with unit tests so I wrote some tests for the Lambda function.

Infrastructure as Code

At this point, the backend infrastructure creation was fully automated with SAM and the frontend was done fully manually.

Source control

I used git from the beginning and stored my code and all my files in Github →(https://github.com/maf1978/CloudResumeChallenge.git)

CI/CD

I had never used Github Actions but I had used a similar CI/CD tool, so this step was quite fast and fun. I created my template and first ran the unit tests for the Lambda function. In the second step, I used the predefined SAM action to build and deploy the infrastructure to AWS. In the last step, I upload the static files to S3.

Conclusion

Although this was my first project, it gave me confidence because I was able to familiarize myself with new terminology, it gave me experience in the parts where I was lacking skills, gained useful skills, learn how to overcome the challenges of completing each step in the process and succeeding all with a hands-on approach in AWS.

Thanks for reading! Please visit my CV website (www.mafcloudsolutions.com) for more of my Cloud adventures!

My Github repo with the challenge:(https://github.com/maf1978/CloudResumeChallenge.git)

Latest comments (0)