- Firstly you should set up you aws credentils at .aws/credentilas with some policies (DynamoDBfullAccess,GatewayfullAdministrator,LambdafullAccess,IAMfullAccess,AmazonAPIGatewayPushToCloudWatchLogs).It's not necessary to do if you use --role AWSLambdaBasicExecutionRole flag into npm run start command.
- Create new User with following policies at IAM with AWS console. After that you need to add keys from AWS IAM into .aws/credentials .
- For getting a Telegram bot access token - use their BotFather bot for creating bots.
- Use claudia update --configure-telegram-bot to configure the access token in your bot.
- aws configure
- cd src/config
- touch .env
- touch .env.test
- After step 3 you need paste your env variables into .env and .env.test files (Bot tokens, webhook, mongoDB).
- npm install
- Command from 6 step will run your app localy with ngrok
- npm run start
- Before using command from 7 step check --profile flag, maybe you can use without this flag. This command will create new Api on AWS.
- npm run create
npm run update
npm run webhook
npm run debug
npm run updateFast
- Open telegram and find there your bot
- Type some text and enjoy
You need to configure the webhook after each launch of your local bot.
MIT