SammyLin / telegram-bot-sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Telegram bot example deploy via AWS CDK

Init

  • Create a telegram bot from botFather, and get the HTTP_TOKEN.

  • export API_KEY in your shell

export API_KEY=1234456789:xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Local testing

$ cd bot

$ python -m venv venv

$ source venv/bin/activate

(venv)$ python index.py 

Deploy to AWS Cloud via Github pipeline

  • feature:
    • Fargate spot save your money

    aws ecs describe-tasks --region ${REGION} --task ${TASK_ID} --cluster telegram-bot | grep capacityProviderName "capacityProviderName": "FARGATE_SPOT"

To Install

yarn

local testing

yarn build

About

License:Apache License 2.0


Languages

Language:TypeScript 53.4%Language:Python 36.6%Language:JavaScript 8.3%Language:Dockerfile 1.7%