Python Telegram Aws Lambda Boilerplate

Boilerplate for a quick start with Telegram and AWS Lambda


Telegram Bot Lambda Boilerplate using Zappa + Hug + Telepot

Git Clone this repo

git clone

Initial setup

pipenv --three
pipenv install

Setup Your Project Variables

Open zappa_settings.json and replace with the name of your project

Setup Your Telegram Bot’s Key

If you dont have one please go to @botfather to get one

Open and replace with your key from botfather

Deploy on AWS Lambda

Assuming you have sufficient permissions run the following commands in the shell

pipenv shell
zappa deploy

Take note of the endpoint of your bot. Will look similar to the following

Telling Telegram your Bot is alive

Send the following curl to Telegram to inform them of your endpoint. Replace the variables below with your own

curl --data "url=<YOUR URL ABOVE>" "<TELEGRAMAPIKEY>/setWebhook"

The reply returned should be True.

Speak to your bot!

Updating your bot

Updates to your bot can be done and then sent to production using

zappa update
comments powered by Disqus