Skip to content

a nodejs serverless telegram bot using Pulumi for deploying to AWS

Notifications You must be signed in to change notification settings

muhannad0/telegram-notify-bot-serverless

Repository files navigation

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

About

a nodejs serverless telegram bot using Pulumi for deploying to AWS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published