Back to Blog Overview

Open Source AWS URL Shortener: Single Script CloudFormation Template

Published on 01.04.2026

We have released the source code for our serverless URL shortener as a standalone CloudFormation template. This allows engineering teams to deploy a private link-management utility directly into their AWS environment, maintaining full data sovereignty.

Scroll down to learn more ⬇️
The Stack


The template provisions a 100% serverless architecture. There are no servers to manage, and costs scale linearly with request volume.

  • Infrastructure: S3 (Static Hosting + Redirects), Lambda (Python 3.12), API Gateway, and CloudFront.
  • License: GPL-3.0 (Community Edition).
  • Regional Restriction: This free template is configured for us-east-1 only.

https://github.com/silverlining-cloud/aws-self-hosted-url-shortener

Why use a self-hosted shortener?


Third-party SaaS shorteners often introduce latency, data privacy concerns, and procurement hurdles. By running the logic in your own VPC, you own the redirection logs, the domain mapping, and the security groups.

Commercial Tiers and Feature Sets


While the community version provides a functional baseline for non-commercial projects in us-east-1, we offer two professional tiers for teams with broader requirements.

1. Paid IaaS (Commercial License) For closed-source or commercial use cases, we provide an enhanced version via the AWS Marketplace.

  • Multi-Region Support: Deploy to any AWS region (not limited to us-east-1).
  • Advanced Logic: Custom URL slugs, adjustable slug lengths, and link expiration (by time or click-count).
  • Telemetry: Integrated click tracking and user interaction data.
  • Support: Direct engineering support via live chat and email.
  • Compliance: Fully licensed for commercial and enterprise environments.

2. Managed SaaS (API Only) For teams that prefer zero infrastructure management, our Managed API provides the same feature set as a hosted service.

  • Billing: Pure Pay-As-You-Go ($0.004 per link) via your cloud bill.
  • Zero Ops: No CloudFormation stacks to monitor or update.

Feature Breakdown


Community Edition (GPL-3.0)

  • Generate/Remove/List links via REST API.
  • Deploy via CloudFormation in us-east-1.
  • Serverless S3/Lambda/CloudFront architecture.
  • Standard API Key authentication.
  • Note: Prohibited for commercial/closed-source use.

Paid IaaS (AWS Marketplace)

  • Includes all Community features.
  • Global Deployment: Works in all AWS regions.
  • Custom Slugs: Modify and personalize link aliases.
  • Link Persistence: Set expiration by hours or click-limits.
  • Analytics: Native click tracking and telemetry.
  • Commercial License: Approved for business and enterprise environments.

Managed SaaS (Marketplace API)

  • Includes all Paid IaaS features.
  • No Infrastructure: No S3 buckets or Lambda functions in your account.
  • One-Click Integration: Get an API key and start shortening immediately.

Quickstart Deployment


Ensure you have the AWS CLI configured for us-east-1 and run the following:

  1. Upload the template: aws s3 cp template.yaml s3://<YOUR_BUCKET>/

Execute the Stack:

aws cloudformation create-stack --stack-name url-shortener \ --template-url https://<YOUR_BUCKET>.s3.amazonaws.com/template.yaml \ --capabilities CAPABILITY_NAMED_IAM

Need global region support or a commercial license? View the Paid Version on AWS Marketplace