Wiring DynamoDB Into Code: Safe Writes a...
AWSDynamoDB

Wiring DynamoDB Into Code: Safe Writes and Atomic Counter

Wire the two handlers into the real DynamoDB: create-link writes an item with a conditional write so it never overwrites a duplicate code, resolve-link does a lookup then counts clicks with an atomic counter. Fire many opens in parallel to see the atomic counter count exactly, and hit a real account limit — Lambda concurrency — when 40 of 50 requests come back 503.

K
KaiMay 26, 2026· 37 views
Global Secondary Index and Sparse Index:...
AWSDynamoDB

Global Secondary Index and Sparse Index: Opening a New Query Path

The single-table from the previous article answers 'open a link by code' fast, but is helpless at 'list a user's links'. This article adds a global secondary index to invert the key and open exactly that query path, then uses a sparse index so the index holds only links and naturally drops the stat records. Create a real GSI, run a real query to see the mechanics.

K
KaiMay 26, 2026· 31 views
DynamoDB Single-Table Design: Start From...
AWSDynamoDB

DynamoDB Single-Table Design: Start From the Questions, Not the Table

DynamoDB design runs opposite to a relational database: you start from the query questions, not from tables. This article lists the URL shortener's access patterns, explains what partition key and sort key actually do, then builds a single-table with an item collection — a link and its click stats live in the same partition and come back in one query. Create a real table, put and query real items to see the mechanics.

K
KaiMay 26, 2026· 18 views
API Gateway: HTTP API or REST API, and B...
AWSAPI Gateway

API Gateway: HTTP API or REST API, and Building the First Routes

API Gateway has two API types with two feature sets and two price tiers. Compare HTTP API and REST API to pick the right one for the URL shortener, then build two real routes: POST /links to create a link and GET /{code} for a 301 redirect. Handle validation, path parameters, and CORS preflight so the dashboard article later doesn't break.

K
KaiMay 26, 2026· 25 views
How Lambda Runs Your Code Internally
AWSHiệu năng

How Lambda Runs Your Code Internally

Dissect Lambda's execution environment lifecycle: the three phases Init, Invoke, Shutdown, why cold start exists, and how static code runs once. Measure cold start for real (Init Duration), then measure the memory–CPU relationship with the same CPU work at 128 MB and 1769 MB. Understand this so later performance and cost decisions have a basis.

K
KaiMay 26, 2026· 34 views
Setting Up the Environment: AWS SAM and ...
AWSLambda

Setting Up the Environment: AWS SAM and Your First Lambda Function

Install the AWS SAM CLI, build a project skeleton for the URL shortener (TypeScript + esbuild), then deploy a real Lambda function to AWS via a Function URL, call it with curl, run it locally in Docker, and clean up with one command. Plus a lesson on the SAM CLI needing to be new enough to support the nodejs22.x runtime.

K
KaiMay 26, 2026· 43 views
What Serverless Is and When to Use It
AWSKiến trúc

What Serverless Is and When to Use It

Series opener: what serverless actually means (not 'no servers'), what it trades away and what it gains, when NOT to use it, and the product we build throughout — a URL shortening service with realtime analytics. Includes the overall architecture diagram and a per-part roadmap.

K
KaiMay 26, 2026· 51 views