Jeevanandan / WorkCase study 02

Serverless URL Shortener · Software Engineering · Serverless & Infrastructure as Code

Zero-idle-costURLshorteningonRust,WASM,andAWS.

Zero-idle-cost URL shortener pairing a client-side Rust & Leptos WebAssembly frontend on Vercel with a modular AWS Lambda, HTTP API Gateway v2, and DynamoDB backend provisioned via Terraform (foundation/ and app/terraform/) on short.jeevanandan.me.

RustLeptosWebAssemblyPython 3.13AWS LambdaAPI Gateway v2DynamoDBTerraformACMVercel
Rust + Leptos (CSR)Compiled to WebAssembly via Trunk
Python 3.13 LambdasPer-function least-privilege IAM
Split Terraform IaCfoundation/ & app/terraform/

02 / System Architecture

Serverless request path, end to end.

A client-side Rust & Leptos WebAssembly frontend on Vercel communicates over HTTPS with HTTP API Gateway v2 on short.jeevanandan.me, routing to least-privilege Python 3.13 Lambda functions backed by on-demand DynamoDB.

Zero-idle-cost production path
Client
Live

Internet

User browser

HTTPS & CORS preflight

Vercel
Live

WASM CSR · Trunk

Rust + Leptos UI

url-shortner-ui-8m49-woad.vercel.app

AWS Cloud
Live

Custom Domain · ACM TLS

HTTP API Gateway v2

short.jeevanandan.me

Python 3.13 Lambdas · Least-Privilege IAM
Live

POST /

create_url

IAM: dynamodb:PutItem

Live

GET /{id}

redirect_url

IAM: dynamodb:GetItem

Per-function IAMCORS preflight
AWS Persistence
Live

PAY_PER_REQUEST

DynamoDB

Zero provisioned capacity

Scoped table access
PutItem (write)GetItem (read)
Client
Live

Internet

User browser

HTTPS & CORS preflight

Vercel · WASM CSR
Live

Rust + Leptos

Frontend UI

Compiled via Trunk

AWS Cloud · API Gateway v2
Live

short.jeevanandan.me

Python 3.13 Lambdas

create_url (PutItem) · redirect_url (GetItem)

AWS Persistence
Live

PAY_PER_REQUEST

DynamoDB

Zero-idle-cost lookups

Hover or focus any node to inspect its role. Write and read paths are isolated with per-function IAM policies.
Create Short URL Flow (POST /)
1 Browser2 Leptos WASM3 CORS Preflight4 API Gateway v25 create_url (PutItem)6 DynamoDB
Redirect Resolution Flow (GET /{id})
1 short.jeevanandan.me/{id}2 ACM TLS + API GW3 redirect_url (GetItem)4 DynamoDB5 HTTP Redirect

03 / Infrastructure as Code

Split Terraform state: persistent foundation, ephemeral app.

Infrastructure is separated into a long-lived foundation/ layer and an independently deployable app/terraform/ stack so tearing down or iterating on compute never risks TLS certificates or custom domain DNS mappings.

Modular Terraform TopologyRemote State: S3 Backend
Persistent

Remote State

S3 State Backend

Isolated state files per layer

Persistent

foundation/

ACM + Domain

TLS cert & short.jeevanandan.me

Live

app/terraform/

App Stack

Ephemeral serverless compute

Ephemeral AWS Resources
Live

Compute + IAM

Lambdas & Roles

create_url + redirect_url

Live

Data

DynamoDB Table

PAY_PER_REQUEST billing

foundation/ persists across terraform destroy runs on app/terraform/, preventing ACM certificate re-validation delays.

04 / Key Engineering & Security Highlights

Rust & Leptos WebAssembly UI

Built the UI in Rust with Leptos (CSR) compiled to WebAssembly via Trunk and deployed on Vercel, handling cross-origin preflight requests cleanly against short.jeevanandan.me.

Least-Privilege Serverless Compute

Implemented Python 3.13 Lambda handlers (create_url and redirect_url) behind HTTP API Gateway v2 with per-function least-privilege IAM roles (dynamodb:PutItem vs. dynamodb:GetItem) and PAY_PER_REQUEST DynamoDB lookups.

Layered Terraform State

Split Terraform into a persistent foundation/ layer (ACM TLS certificate, custom domain mapping, S3 state) and an ephemeral app/terraform/ application stack.

Live deployment, custom shortener domain, and both source repositories.