BBCEarthDailyBot is a Telegram bot that posts a daily video to the BBCEarthDaily channel on Telegram. The videos are sourced from the BBC Earth YouTube channel.
It uses AWS Lambda to execute the functions and AWS CloudWatch Events for scheduling the events.
Subscribe to the channel to get your daily dose of BBC Earth.
Install all dependencies:
npm install
Run tests
npm test
Run all tests in watch mode
npm run test:watch
View test coverage report
npm run test:coverage
We will bundle all files in the project into bundle.js
and then create a zip file app.zip
.
Next, we will use AWS CLI to deploy our app.
npm run build
brew install aws-cli
aws configure
AWS Access Key ID [None]: YOURKEYHERE
AWS Secret Access Key [None]: YOURSECRETKEYHERE
Default region name [None]: ap-southeast-1
Default output format [None]: json
You can get your AWS user credentials from the IAM management console.
Learn more about configuring the AWS CLI.
npm run list
npm run info
npm run deploy
Get list of versions of a lambda function
npm run versions
Update alias to latest version number
npm run update-alias -- <version-number>
For example, if the latest version is 10, you would execute
npm run update-alias -- 10
aws lambda help
You can read more about using AWS Lambda with AWS CLI.