Cloud Resume Challenge

Nicole Joaquin
4 min readDec 13, 2022

--

Introduction:

Before this semester, I always wondered how people would host their websites on the internet, but here I am, four months later, hosting my website that displays my resume. While it was a difficult process, I found it to be very interesting and much different from my previous experience in computer science.

NameCheap & Route 53:

I started the challenge by purchasing a domain name to secure nicolejoaquin.com using NameCheap. I created a hosted zone on Route 53 for my domain. I then proceeded to change the domain’s nameservers to point to AWS’ nameservers instead which I also got from Route 53. After completing these steps, it was time to set up my actual website.

AWS S3 & Route 53:

The following AWS service I used was S3. I created multiple buckets named www.nicolejoaquin.com, resume.nicolejoaquin.com, and the original, nicolejoaquin.com. In each bucket, I made a bucket policy so that we can access them through the public internet. I wanted to make sure the website was running the way it should be so I uploaded a simple HTML file for demo purposes inside the original site’s bucket.

Next, I wanted www.nicolejoaquin.com and resume.nicolejoaquin.com to redirect to nicolejoaquin.com when either one is searched on the web. To do this, I went back to Route 53 and created a CNAME record for all of the domains. I also had to configure the individual buckets to redirect to the original bucket.

AWS Certificate Manager & AWS CloudFront:

At the start of the project, my original domain was utilizing the HTTP protocol. For security purposes, I wanted the website to use HTTPS to prevent unwanted parties from seeing the data transmitted between the users and my website. To start the process, I requested a certificate for nicolejoaquin.com as well as resume.nicolejoaquin.com through AWS Certificate Manager. The certificate is issued once it ensures I am the one in control of the domain.

Once the certificate has been granted, I returned to S3 to enable HTTPS and HTTP on all of my buckets, and then I used AWS CloudFront to secure my website over HTTPS. To do this, I chose the option “redirect HTTP to HTTPS” when creating a distribution for all three of my sites. Furthermore, I made to sure add the SSL certificates in CloudFront. Creating the CloudFront distribution meant that additional CNAME records would be created in Route 53. From there, whenever I would search my domain, it no longer uses the HTTP protocol, but HTTPS instead. The last step of this process is to point the records in Route 53 to my CloudFront URLs. In addition, whenever I would access the CloudFront distribution’s domain name, it would open up my original site using HTTPS.

JavaScript, DynamoDB, Lambda, & AWS API Gateway:

The challenge required us to include a visitor counter. In order for my resume website to display how many people have accessed the page, I created a JavaScript file, which invokes the API, and uploaded the script inside my original page’s bucket in S3. The first AWS service I used for this requirement is a NoSQL database, AWS’ DynamoDB. I created two tables named visitor with a string partition key “visitor_id” and visitor_count with a string partition key “path”. Inside of the visitor_count table, I made index.html as my path with the quantity of zero. This item will track how many people have viewed my website. I learned that a partition key is used to fetch items from the table and assign data while the sort key’s function lets the users to sort or search all items with the same key. The next thing I needed to do was set the capacity mode to On-Demand so the table only runs when there are changes.

After creating the two tables in DynamoDB, I used AWS Lambda to make a function. Lambda gave me a variety of options when I created my function, visitorCounter. I selected Python 3.9 since it was the language I was most familiar with. Fortunately, I was provided with the code to increment the view count by one.

However, my visitor_count table wasn’t returning any items. At first I thought it was a typo in my code so I had to carefully read and check every word to make sure I typed and formatted everything correctly. In order to see what was going wrong, I configured multiple test events and ran my code. It kept telling me I had an unexpected indent when that wasn’t the case. I decided to use the developer tools in Google Chrome and was faced with an 404 error. With a few tweaks in my index.html, such as copy and pasting the path to file in the S3 bucket and creating a new function, my visitor counter was finally functioning correctly. Once this was resolved, I could move on to adding the content of my PDF resume to my resume website and how I wanted it to look through HTML and CSS.

What I Learned:

The biggest thing I learned through the Cloud Resume Challenge was the amount of work and steps there were just to have a single website running. While I didn't think it was going to be an easy task, there were many days where I was frustrated by the problems I kept running into. Despite this, it was incredibly rewarding and a great learning experience. This challenge emphasized the importance of security and consistency.

--

--