beginner 3-4h

Serverless URL Shortener

Lambda + DynamoDB + API Gateway, all in IaC.

0%

0 of 6 steps

What you will end up with

A working serverless API

A NoSQL data store

Everything defined in code

Build steps

0/6

Sketch two endpoints, one to create a short link and one to follow it, plus a table with a code column and a url column. This is drawing the blueprint before ordering a single brick.

Write a handler that reads the incoming request, looks up or writes to the table, and returns a response. The function is the one clerk working the counter, called fresh for every single request.

Define a table with the short code as its partition key so lookups are instant. A partition key is the label on a filing drawer; the database goes straight to that drawer instead of searching every one.

Create routes that map HTTP methods and paths to your Lambda function. API Gateway is the receptionist who reads the request and buzzes the right clerk in the back.

Write resources for the function, the table, and the API instead of clicking through the console by hand. Writing it down means you can rebuild the entire office from scratch with one command.

Apply the config, then send a real request to shorten a link and another to follow it. Test drive the car before handing the keys over to real users.

Before you start

Compute optionsHCL & providers