Serverless URL Shortener · Software Engineering · Serverless & Infrastructure as Code
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.
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.
Internet
User browser
HTTPS & CORS preflight
WASM CSR · Trunk
Rust + Leptos UI
url-shortner-ui-8m49-woad.vercel.app
Custom Domain · ACM TLS
HTTP API Gateway v2
short.jeevanandan.me
POST /
create_url
IAM: dynamodb:PutItem
GET /{id}
redirect_url
IAM: dynamodb:GetItem
PAY_PER_REQUEST
DynamoDB
Zero provisioned capacity
Internet
User browser
HTTPS & CORS preflight
Rust + Leptos
Frontend UI
Compiled via Trunk
short.jeevanandan.me
Python 3.13 Lambdas
create_url (PutItem) · redirect_url (GetItem)
PAY_PER_REQUEST
DynamoDB
Zero-idle-cost lookups
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.
Remote State
S3 State Backend
Isolated state files per layer
foundation/
ACM + Domain
TLS cert & short.jeevanandan.me
app/terraform/
App Stack
Ephemeral serverless compute
Compute + IAM
Lambdas & Roles
create_url + redirect_url
Data
DynamoDB Table
PAY_PER_REQUEST billing
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.