All projects

AWS infrastructure as code · 2020

Serverless résumé with CloudFormation

A secure static résumé website backed by a serverless visitor counter, automated delivery, and repeatable AWS infrastructure defined in CloudFormation.

RoleDesigner & developer
FocusServerless web architecture
DeliveryCloudFormation & CI/CD

Overview

A static website with a fully serverless foundation.

The project began as a static résumé and grew into an end-to-end AWS build. The site is delivered securely through a CDN, a serverless API records visitors, source changes flow through an automated pipeline, and CloudFormation defines the infrastructure.

ServerlessNo dedicated compute instances to operate
SecureHTTPS delivery with restricted S3 access
RepeatableInfrastructure can be provisioned in about 10 minutes

Architecture

One request path for content, another for the counter.

Route 53 directs site traffic to CloudFront, which serves the static content from a protected S3 origin. Browser JavaScript calls API Gateway, which invokes Lambda to update the visitor record in DynamoDB.

AWS architecture for the serverless résumé website
Static delivery, serverless API, database, and automated deployment in one architecture.

Implementation

Building the site from the front end inward.

01

Front end

A lightweight HTML, CSS, and JavaScript résumé calls the visitor API and renders the returned count.

02

Secure hosting

S3 stores the site, CloudFront provides low-latency HTTPS delivery, ACM supplies the certificate, and Route 53 connects the domain.

03

Serverless API

API Gateway invokes a Python Lambda function that uses the AWS SDK to atomically update a DynamoDB counter and return JSON with CORS headers.

04

Restricted origin

The S3 content is not exposed as the public delivery layer; access is limited to CloudFront through the origin configuration.

Automation

Removing manual deployment from the workflow.

Manually replacing files in S3 was slow and error-prone. The project moved its source into CodeCommit and introduced CodePipeline so each accepted change automatically publishes the latest site artifacts to the hosting bucket.

Infrastructure as code

Rebuilding the complete environment from a template.

I translated the build into CloudFormation YAML using parameters, metadata, outputs, resource references, substitutions, joins, and attribute lookups. The template creates the storage, API, Lambda function, DynamoDB table, certificate, and routing resources without assembling them manually in the console.

Lessons

What this project reinforced.

  • A static front end can still support useful dynamic features through focused serverless APIs.
  • CDN delivery, certificates, DNS, and origin permissions are all part of a secure hosting design.
  • Automated delivery makes small website changes safer and easier to repeat.
  • Infrastructure as code exposes hidden dependencies and turns a one-time build into a reproducible system.