Create a personalised news feed with AWS Lambda, Telegram and NewsAPI

Full implementation is here

The end goal is to allow us to filter and focus on the news that matter. If you’re new to Telegram, you may follow my previous example to create a telegram bot and channel. The news feeder is configurable through a config that looks like this.

query: {
  language: 'en',
  q: 'apple OR google OR amazon OR facebook', // keyword
  sortBy: 'publishedAt'
filter: { // additional filter
 title: [
  'google', 'amazon', 'tesla', 'facebook', 'netflix',
  'intel', 'alibaba', 'nvdia', 'dropbox', 'spotify',
  'microsoft', 'apple', 'nasdaq', 'trump'

The serverless function accept query from config to construct complete API call and there’s additional filter to remove irrelevant news based on title because q will get all news by keyword

In order to deploy the application, run serverless deploy --stage=dev assume you created a .You can create more than one env config file.