Table of Contents
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.
- Node.js
- npm
- AWS CLI configured with appropriate credentials
- Telegram API credentials (obtainable from https://my.telegram.org/auth)
-
Clone this repository to your local machine.
-
Install dependencies:
npm install
-
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. -
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. -
Build the project:
npm run build
-
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.
-
If you haven't bootstrapped your CDK environment, run:
npx cdk bootstrap
-
Deploy the stack:
npx cdk deploy
Once deployed, the application will:
- Monitor the specified Telegram usernames at the configured interval.
- Send notifications about username availability.
- Automatically create a channel with the desired username as soon as it becomes available.
- 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)
- The
account.checkUsername
API call can be called 200 times per day.