DavisDmitry / aiogram-aws-serverless-example

Simple echo Telegram bot example on aiogram framework using AWS API Gateway & Lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aiogram AWS serverless example

Supported python versions Telegram Bot API Aiogram AWS API Gateway AWS Lambda

Simple echo Telegram bot example on aiogram framework using AWS API Gateway & Lambda.

Deploy

Create deployment package

  • Clone this repository: git clone https://github.com/DavisDmitry/aiogram-aws-serverless-example.git
  • Change to the directory with the repository copy: cd aiogram-aws-serverless-example
  • Run create-package bash script: ./create-package.sh

Create, configure and deploy a Lambda function


(video)

Environment variables:

  • TOKEN: Bot API token from botfather
  • LOGGING_LEVEL: logging level (optional), default - info

Create and configure API Gateway entrypoint

  • Create and configure API Gateway entrypoint:


(video)

  • Set webhook for your bot: follow the link through your browser or using curl – https://api.telegram.org/bot{your_bot_api_token}/setWebhook?url={your_api_gateway_url}

Profit!

About

Simple echo Telegram bot example on aiogram framework using AWS API Gateway & Lambda

License:MIT License


Languages

Language:Python 91.4%Language:Shell 8.6%