Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

URL shortener architecture

What is a VPC: your own private network inside one AWS Region, example ThreeTierVpc 10.0.0.0/16.

URL shortener architecture Pieces must fit: front door, compute, and keyed storage for millions of codes. HTTP API routes → one Lambda → DynamoDB table with partition key shortCode (String). Attributes: longUrl, clicks. Create table on-demand, IAM role with Put/Get/UpdateItem, paste handler, add POST /shorten and GET /{code}, set TABLE_NAME and BASE_URL. curl POST /shorten then curl -I /CODE shows
URL shortener architecture · Download PNG
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.

See all AWS revision cards