Skip to content

Latest commit

 

History

History
86 lines (54 loc) · 1.67 KB

README.md

File metadata and controls

86 lines (54 loc) · 1.67 KB

Serverless Telegram Bot on AWS

A NodeJS Telegram bot deployed using Pulumi.

Frameworks Used

Requirements

Installation

  • Install Pulumi.

  • Install the required dependencies.

npm install
  • Build the Lambda functions.
npm run build
pulumi stack init <stack_name>
  • Configure the AWS region you want to deploy into.
pulumi config set aws:region <aws_region>
  • Add the Telegram Bot token received as a secret to Pulumi config
pulumi config set tgBotToken <your_token> --secret
  • Deploy the application.
pulumi up
  • You can check the bot's status with the /health endpoint.
curl $(pulumi stack output apiUrl)/health
  • Using set-webhook endpoint, register the bot's webhook on Telegram
curl -X POST $(pulumi stack output apiUrl)/set-webhook

Usage

Now you can /start a conversation with the bot.

Removal

  • To delete the project from AWS.
pulumi destroy

Acknowledgements