URL shortener
Written by
Updated at May 26, 2026
This tool accepts user requests via a public API gateway: Yandex API Gateway. The user receives an HTML page with a URL input field from a hosting service. The Yandex Cloud Functions function sends the entered URL for storage to a Yandex Managed Service for YDB serverless database, shortens it, and returns it to the user. When the user follows the shortened URL, the function retrieves the full URL from the database and performs a redirect.
You can create the infrastructure for your URL shortener using one of these tools:
- Management console: Create your URL shortener step by step in the Yandex Cloud management console.
- Terraform: Streamline creating and managing your resources with the infrastructure as code (IaC) approach. Download a Terraform configuration example from the GitHub repository and deploy your infrastructure using the Yandex Cloud Terraform provider.