Skip to content

An AWS CDK stack that deploys an application to monitor and automatically claim available Telegram usernames.

License

Notifications You must be signed in to change notification settings

nuromirzak/telegram-username-monitor

Repository files navigation

Telegram Username Monitor CDK Stack

Table of Contents
  1. Prerequisites
  2. Setup
  3. Deployment
  4. How it works
  5. TODO
  6. Considerations

This project is an AWS CDK stack that deploys an application to monitor Telegram usernames and automatically occupy them as soon as they become available. This project runs on AWS Free Tier services, incurring no costs under normal usage.

Prerequisites

Setup

  1. Clone this repository to your local machine.

  2. Install dependencies:

    npm install
  3. Copy the environment file and fill in your Telegram credentials:

    cp .env.example .env

    Edit .env and add your Telegram API ID and API Hash.

  4. Copy the configuration file and specify the usernames to monitor:

    cp config.example.json config.json

    Edit config.json to add the desired usernames to monitor and set the check interval in minutes.

  5. Build the project:

    npm run build
  6. Generate a STRING_SESSION for Telegram authentication:

    npm run generate

    Follow the prompts to generate the session string. This will automatically be added to your .env file.

Deployment

  1. If you haven't bootstrapped your CDK environment, run:

    npx cdk bootstrap
  2. Deploy the stack:

    npx cdk deploy

How it works

Once deployed, the application will:

  1. Monitor the specified Telegram usernames at the configured interval.
  2. Send notifications about username availability.
  3. Automatically create a channel with the desired username as soon as it becomes available.

TODO

  • Estimate WCU and RCU for the tables
  • Estimate configuration for the lambda functions
  • Add authentication to the API Gateway
  • Create a single bash script to deploy the whole stack
  • Replace an unencrypted STRING_SESSION with a secure method (e.g. AWS Secrets Manager)

Considerations

  1. The account.checkUsername API call can be called 200 times per day.

About

An AWS CDK stack that deploys an application to monitor and automatically claim available Telegram usernames.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published