Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

DavisDmitry/aiogram-aws-serverless-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!