TinyURLCDK is a serverless URL shortening service built with AWS CDK in TypeScript. It provides APIs to create shortened URLs and retrieve original links.
- AWS CDK (TypeScript) – Infrastructure as Code
- AWS Lambda – Serverless compute for business logic
- Amazon API Gateway – RESTful API routing and management
- Amazon RDS (PostgreSQL) – Relational SQL backend for persistent storage
- Amazon ElastiCache (Redis) – In-memory caching for fast lookups
- TypeScript – Language for both infrastructure and function code
- Dynamically create and deploy AWS CDK stacks
- Shorten long URLs into TinyURLs via API
- Retrieve the original URL from a shortened link
POST /shorten– Shorten long URLGET /{code}– Retrieve the original URL
To deploy the project:
# Install dependencies
pnpm install
# build code
pnpm run build
# Bootstrap your environment (only once)
cdk bootstrap
# Deploy the stack
cdk deploy
# Destroy the stack
cdk destroy