A serverless URL shortener with animated factory-themed UI built on AWS.
- 🏭 Factory Animation - Watch URLs get processed in a digital factory
- ⚡ Serverless - Built with AWS Lambda, API Gateway, DynamoDB
- 🔒 Rate Limiting - 10 URLs per IP per day
- ✅ URL Validation - Frontend format check + backend accessibility check
- 📱 Mobile Responsive - Works on all devices
- 🎨 Modern UI - Smooth animations and gradients
- AWS CLI configured
- AWS SAM CLI installed
- Bash shell
chmod +x deploy.sh
./deploy.shChoose N when asked about CloudFront (unless you need CDN).
- Lambda Functions: URL creation and redirection
- API Gateway: HTTP API endpoints
- DynamoDB Table: URL storage with rate limiting
- S3 Bucket: Static website hosting
- CloudFront (optional): CDN distribution and https with OAC
After deployment, test the API:
# Create short URL
curl -X POST https://YOUR-API-URL/shortner/create \
-H 'Content-Type: application/json' \
-d '{"long_url":"https://example.com"}'
# Access short URL (redirects)
curl -I https://YOUR-API-URL/shortner/SHORT_CODEDelete all AWS resources:
chmod +x cleanup.sh
./cleanup.shThis removes:
- S3 bucket and files
- CloudFormation stack (all resources)
- Local build artifacts
url-shortner/
├── src/
│ ├── lambda/ # Python Lambda functions
│ └── static-web/ # Frontend (HTML/CSS/JS)
├── template.yml # SAM template
├── cloudfront-template.yml # Coludfront deployment with OAC
├── deploy.sh # Deployment script
├── cleanup.sh # Cleanup script
└── README.md
- Animated conveyor belts
- Rotating factory machine during processing
- Smooth transitions and error handling
- Copy to clipboard functionality
- URL format validation
Edit deploy.sh and cleanup.sh to change:
PROJECT_NAME- Project identifierREGION- AWS region (default: ap-south-1)
- Free Tier: Likely free for low usage
- DynamoDB: On-demand pricing
- Lambda: Pay per request
- API Gateway: Pay per request
- S3: Minimal storage costs
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch
- Make your changes
- Test locally with
./deploy.sh - Submit a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.