The Task Management Bot is a serverless application designed to assist in task management. It is deployed using AWS Lambda, API Gateway for endpoint management, CloudWatch Logs for logging, and a webhook for communication.
- Serverless architecture
- AWS
- Python
The project is built with Python, AWS Lambda, AWS API Gateway, AWS CloudWatch Logs:
To get started, follow the steps below:
- Python
- requests
- AWS account
-
Clone the repository:
git clone https://github.com/Daniel-Shwartzman/TaskManagementBot.git cd TaskManagementBot
-
Install the required dependencies:
pip install -r requirements.txt
-
Open the AWS Lambda Console:
- Go to the AWS Lambda Console.
-
Create a Lambda Function:
- Click the "Create function" button.
-
Select Author from Scratch:
- Choose "Author from scratch."
-
Configure the Basic Information:
- Function Name: Enter a unique name for your function.
- Runtime: Choose the runtime for your function (e.g., Python, Node.js).
- Role: Choose an existing role or create a new one with basic Lambda permissions.
- Click "Create Function":
- After configuring the basic information, click the "Create function" button.
- Open the API Gateway Console:
- Go to the API Gateway Console.
- Create a New API:
- Click the "Create API" button.
-
Choose "HTTP API":
-
Configure Your API:
- Enter a name for your API.
- Optionally, add a description.
- Click the "Create API" button.
Invoke-RestMethod -Uri "https://api.telegram.org/bot<TOKEN>/setWebhook?url=<Your_API_Invoke_URL>" -Method Post
curl -X POST "https://api.telegram.org/bot<TOKEN>/setWebhook?url=<Your_API_Invoke_URL>"
- Copy bot.py and paste it in Lambda.
- Config webhook
- Click deploy
- Run a test (optinal)
- Make sure the lambda handler is your module name.lamda_handler (ex. bot.lamda_handler)
- Make sure you set your API Gateway as HTTP API and POST
- Don't forget to config the webhook