AWS Serverless Resume Site Challenge

The Challenge

The challenge is to create a resume website with a view counter using cloud best practices. My goal is to explore & demonstrate how simple it can be to deploy a fully customizable webapp into AWS using serverless components & the AWS CDK.

The solution

All the code for the solution can be found at nathanamorin/resume-challenge

I will be adding posts detailing the different components of CDK & how using CDK can simplify creation of resources in AWS.

The final website can be found at resume.nathanmorin.com

The archetecture uses a serverless pattern as most of the site is static content with a small API to track views. Serverless also allows hosting the side with near zero cost.

Cloudfront sits in front of both S3 files which holds the static site files as well as the API Gateway / Lambda used to serve the view count API.

The view count API has a single method /count, which both increments the current view count & returns the incremented count.

The frontend is a simple static HTML page with a single javascript function to make a request to the /count api & update the DOM element with the rerieved count.

Resume Site Diagram

Bootstraping Content

To keep it simple :), I exported my resume from Google Docs as a HTML site. This will be the foundation of the frontend for my simple resume site.

Starting the Infrastructure

To help with the later CD process, I used AWS CDK. The AWS CDK has proved very useful in my professional projects & will simplify the AWS deployment process for this app. I used the python CDK flavor.

Following the CDK getting started guide.

I’m on Mac, so I ..

brew install node

npm install -g aws-cdk

I created a user with admin access to run CDK under (after finding what permissions are required, this will be updated to follow least privilage) in AWS console & setup my local AWS credentials config & region. I will be using us-east-1 for this config as I know I want to use cloudfront to host my static files. Cloudfront is only avialable in us-east-1, so using us-east-1 allows me to use a single cloudformation / CDK stack.

cdk init app --language python

python -m pip install -r requirements.txt

This sets up the basic infra deploy environment for the app. More posts will follow diving into details on each infra component defined in the CDK as well as the Github Actions CI/CD automation.