Skip to content

chenjie/serverless-oinp-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless OINP Notifier

serverless

OINP stands for Ontario Immigrant Nominee Program. You can learn more about it here.

This is a fully serverless application running on AWS. It leverages AWS Free Tier to send notifications whenever there is an update on the targeted OINP official webpage.

Sample email notification

Prerequisites

You will need the following packages properly installed in your local environment in order to deploy this app.

Name Tested version(s)
Git 2.17.0
Node.js (with NPM) node==12.16.3, npm==6.14.4
Serverless Framework core==1.77.1, plugin==3.6.18, sdk==2.3.1, components==2.33.1
AWS CLI aws-cli/2.0.16 Python/3.7.4 Darwin/18.7.0 botocore/2.0.0dev20

Get started

Search for [Action required] in serverless.yml, and change the bucketName to make it globally unique.

git clone https://github.com/jellycsc/serverless-oinp-notifier.git
cd serverless-oinp-notifier/
npm i -g serverless
npm i
sls deploy

Features

  1. Uses headless Chrome to render dynamic javascript content [ref]
  2. Checks for update every minute [ref]
  3. Ability to send notifications of type HTTP/HTTPS, SMS or Email [ref]
  4. Full-page screenshot is taken on each webpage update [ref]

A list of AWS services used in this app:

  • Lambda
  • CloudFormation
  • S3
  • DynamoDB
  • CloudWatch
  • EventBridge

Estimated monthly cost

$0 since everything is under "Always Free" type of AWS Free Tier

Extra notes and tips

DynamoDB table design

It is designed this way to allow easy query for the latest record.

Use lambda layers

You can use lambda layers to reduce the deployment package size from 45 MB to <100 KB. Checkout the use-layers branch of this repo.

License

MIT