Issue when running an AWS Lambda Node.js function with a simple Telegram bot example

Viewed 27

I'm exploring Telegram bots and have two AWS Lambda functions, one written in Python and another in Node. The Python lambda works fine and is able to send messages to a Telegram chat. However I've tried to do the same with a very simple example in the Node lambda but it does not work. There is no error but no messages are sent to the chat.

The repository I'm using is: https://github.com/xoopisoft/aws-lambda-nodejs-telegram-bot/tree/feature/simple-implementation (the chat id and the token are blurred for security reasons)

In summary, there are 2 main components: the index.js file with the code and the NPM dependency for telegram-bot-api

I know that the bot is correctly setup because the messages work for the same bot from the Python lambda. So probably there is a silly mistake (I'm a Node newbie...). Does someone know what might be the problem? Thanks in advance

0 Answers
Related