https://github.com/DavisDmitry/aiogram-aws-serverless-example
Simple echo Telegram bot example on aiogram framework using AWS API Gateway & Lambda
https://github.com/DavisDmitry/aiogram-aws-serverless-example
aiogram aws aws-api-gateway aws-apigateway aws-lambda aws-python aws-python-lambda python python3 serverless telegram telegram-bot telegram-bot-api
Last synced: 11 months ago
JSON representation
Simple echo Telegram bot example on aiogram framework using AWS API Gateway & Lambda
- Host: GitHub
- URL: https://github.com/DavisDmitry/aiogram-aws-serverless-example
- Owner: DavisDmitry
- License: mit
- Archived: true
- Created: 2020-07-28T07:46:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T08:08:19.000Z (over 5 years ago)
- Last Synced: 2024-08-03T01:16:23.089Z (over 1 year ago)
- Topics: aiogram, aws, aws-api-gateway, aws-apigateway, aws-lambda, aws-python, aws-python-lambda, python, python3, serverless, telegram, telegram-bot, telegram-bot-api
- Language: Python
- Homepage:
- Size: 757 KB
- Stars: 29
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aiogram AWS serverless example
[](https://www.python.org/)
[](https://core.telegram.org/bots/api/)
[](https://github.com/aiogram/aiogram/)
[](https://aws.amazon.com/api-gateway/)
[](https://aws.amazon.com/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
- [Create a new bot at botfather](https://core.telegram.org/bots#6-botfather)
- Create AWS Lambda function, set environment variables and deploy package:
#### 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:
- 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!

