Security Engineer · CCSP · Azure native, AWS curious

Secure by default, from the bucket policy to the CORS header.

I'm Jonathan. This is my AWS Cloud Resume Challenge: a static site on S3 and CloudFront, two Lambdas, DynamoDB, Terraform and GitHub Actions, built the way I would build it at work. It also serves Star Wars facts, because I work for the Empire.

S3CloudFrontACMRoute 53LambdaAPI GatewayDynamoDBTerraformGitHub Actions

01 · The project

A resume site, built like production.

The Cloud Resume Challenge asks for a static page with a visitor counter. I treated it as a small production system instead: private origins, least privilege, pinned dependencies, tested deploys, external monitoring, and a second API because one Lambda is never enough.

Front line

Static, private, cached

Plain HTML, CSS and JavaScript in a private S3 bucket. CloudFront is the only reader, through origin access control, and serves it over TLS from ACM on a Route 53 domain.

Back end

Two tiny Lambdas

A Python function behind a Lambda URL increments the visitor count in DynamoDB. A Node 22 function on arm64 behind API Gateway serves cyber × Star Wars facts with strict CORS and hardened headers.

Delivery

Pipelines that heal

GitHub Actions runs unit tests, repairs a stuck CloudFormation stack, deploys with the Serverless Framework and smoke-tests the live endpoint. The site syncs to S3 and purges the CDN.

02 · Architecture

One push, two paths.

A merge to main fans out into a site deploy and an API deploy. Visitors never touch a server: the browser reads from the CDN and calls two serverless endpoints.

Architecture diagram GitHub pushes trigger GitHub Actions, which syncs the site to S3 and deploys the Star Wars API Lambda. CloudFront serves S3 to the visitor over HTTPS. The visitor calls API Gateway, which invokes the Star Wars Lambda, and calls a Lambda URL that updates the visitor count in DynamoDB. Terraform provisions the counter Lambda and the table. push sync OAC HTTPS serverless deploy GET invoke GET views UpdateItem terraform apply GitHubpush to main GitHub Actionstests · sync · deploy Amazon S3private origin CloudFront + ACMTLS edge Visitorcloud.mrcyberleon.org API GatewayREST · strict CORS Lambdastarwars-api · Node 22 Terraforminfrastructure as code DynamoDBviews table Lambda URLvisitor counter · Python
  1. 01
    Push to mainPull request, review, merge. Nothing deploys from a laptop.
  2. 02
    GitHub ActionsSite changes sync assets/ to S3. API changes run tests, stack repair, deploy and a smoke test.
  3. 03
    S3 and CloudFrontPrivate bucket, origin access control, TLS at the edge, cache purged on deploy.
  4. 04
    BrowserReads the page from the CDN, then calls the Lambda URL for the count and API Gateway for a fact.
  5. 05
    TerraformDefines the counter Lambda, its IAM role and the DynamoDB table so the infrastructure is reviewable in Git.

03 · Security

Boring on purpose.

Nothing here is clever. Each decision removes a way for this to go wrong.

Private origin

The S3 bucket blocks public access. Only CloudFront can read it, through origin access control. No website endpoint, no public ACLs.

TLS everywhere

ACM certificate on the distribution, HTTPS only, custom domain on Route 53. API Gateway and the Lambda URL are HTTPS by default.

Strict CORS

The intel API echoes only allow-listed origins. Every response is JSON with Cache-Control: no-store and X-Content-Type-Options: nosniff. Query parameters are validated and rejected with a 400.

Least privilege

The counter's role can touch one DynamoDB table. The intel Lambda needs no AWS permissions at all. Workflows run with a read-only token.

Pinned supply chain

Third-party actions pinned by commit, lockfile installs with npm ci, Dependabot and Snyk on dependencies, CodeQL on every push. This page loads no external fonts or scripts.

Deploys that fail safe

Unit tests gate the deploy, a repair step finishes a stuck CloudFormation rollback instead of piling a new update on top, and a smoke test proves the live endpoint before the job goes green. One deploy at a time.

Watched from outside

UptimeRobot checks the site every few minutes and pages me by email, text and phone.

Small blast radius

Two tiny functions, no servers, no database credentials, a few kilobytes of static files. There is very little here to compromise.

04 · Intel

A fact from the Empire.

Each request calls API Gateway, which invokes the Node Lambda and returns one cyber × Star Wars fact. Loot is rated by rarity, as it should be.

Press New fact to pull one from the API.

GET /starwarsfact

05 · About

Jonathan DeLeon

Illustrated portrait of Jonathan DeLeon

Security engineer with a CCSP and a long Azure background. I spend my days on cloud defense, DevSecOps and detection engineering, writing KQL for Microsoft Defender and LEQL for Rapid7, and my evenings running a k3s homelab on Raspberry Pis and writing World of Warcraft addons.

This project exists because I had no AWS experience and wanted some. The challenge gave me a reason to touch S3, CloudFront, Lambda, API Gateway, DynamoDB and Terraform end to end, and to find out how the security habits I have in Azure translate.

Role
Security Engineer
Clearance
CCSP
Realms
Azure · AWS
Faction
Empire
Guild
<Defenders of Companies>
Weapons
KQL · LEQL · Terraform