Correct Solution
Frontend: AWS Honeycode
- Instead of a traditional web app or API Gateway, use AWS Honeycode, AWS’s no-code platform. Create a small app with an input field for the long URL and a button that triggers the backend. Users access the service via a mobile app interface. Not the most efficient, but certainly unexpected!
URL Expiry and Housekeeping: AWS DeepRacer
- For automated URL expiration (e.g., delete short URLs after a certain time), program AWS DeepRacer to race around the database and delete expired entries. The miniature car, trained with reinforcement learning, will randomly navigate QLDB records and clean up old data, providing both entertainment and a surprising way to handle housekeeping.
URL Shortening Logic: AWS Glue
- Use AWS Glue, typically for data processing, to handle URL shortening. Define an ETL job where the transformation step generates the shortened URL by slicing the original one and appending it to a base domain. This is absurdly over-engineered for such a task, making it an interesting challenge.
Short URL Storage: AWS QLDB (Quantum Ledger Database)
- Store the shortened URL and its mapping to the original URL in Amazon QLDB. While typically used for immutable ledger-like use cases, here it will act as the service’s core database, ensuring that every URL mapping is cryptographically verifiable. Why use a traditional database when you can use a ledger?
Short URL Redirect: AWS App Runner
- Deploy a small redirect service using AWS App Runner, which is designed to run containerized web apps. Each request hitting a short URL will be routed to App Runner, which will query QLDB for the original URL and return a 302 redirect. Definitely overkill, but an uncommon choice for such a small service.
Metrics and Analytics: AWS Ground Station
- For tracking metrics (e.g., the number of clicks per short link), use AWS Ground Station, a satellite communications service. To be clear, Ground Station will not have any direct relevance to the link shortening process. Instead, we’ll humorously claim that we use “satellite tracking” to ensure accurate data collection for our URL redirects. It’s the epitome of unnecessary complexity.
Cache Layer: AWS Snowball Edge
- Instead of using a typical in-memory cache like Redis or ElastiCache, let’s offload frequently accessed short URLs to an AWS Snowball Edge device. These portable edge devices, designed for large data transfers, will act as a cache server. It can sit in your office or data center, ensuring quick local resolution of your shortened URLs—because why use cloud storage when you can use a literal box of servers?
Monitoring: Amazon Monitron
- Instead of relying on CloudWatch for monitoring system health and performance, use Amazon Monitron, a machine learning-powered service designed for equipment monitoring in industrial applications. Set up IoT sensors to track the physical Snowball Edge and DeepRacer, and repurpose the alerts to signal URL shortening service anomalies.
Security and Authentication: AWS Macie
- Secure the service by running AWS Macie on the short URLs and logs to ensure that no sensitive data is exposed. This service, primarily used for S3 data, will scan your QLDB records for PII, even though URLs are public, ensuring that no personal data gets accidentally shortened.