Ravi Sir's Cards › AWS
URL shortener architecture
This revision card explains URL shortener architecture. It starts from the need that pieces must fit — front door, compute, and keyed storage for millions of codes. It describes HTTP API routes , then one Lambda , then DynamoDB table with partition key shortCode (String). Attributes: longUrl, clicks. The how-to section covers how to create table on-demand, IAM role with Put/Get/UpdateItem, paste handler, add POST /shorten and GET /{code}, set TABLE_NAME and BASE_URL.
Read card text
What this card says
Why do we need it?
Pieces must fit: front door, compute, and keyed storage for millions of codes.
What is it?
HTTP API routes → one Lambda → DynamoDB table with partition key shortCode (String). Attributes: longUrl, clicks.
How to do it
Create table on-demand, IAM role with Put/Get/UpdateItem, paste handler, add POST /shorten and GET /{code}, set TABLE_NAME and BASE_URL.
yourname-urls
Example
curl POST /shorten then curl -I /CODE shows Location: https://ravindrabagale.com/aws/ and clicks becomes 1.