Monitor AQI using AWS Lambda
Notifies Slack Channel with Status Message when the level changes.
Allows monitoring of multiple Cities by using multiple deploys.
Only works for Cities from BC.
Very easy! Just follow the instructions below for setup and testing. Then configure a city and deploy.
Requires npm and serverless framework to be installed globally.
In your project folder run
npm install
then
npm test
This project uses js-gardener and lambda-tdd. More details on testing and debuggging are documented under those projects.
- Create config under
config/[FILL CONFIG NAME].yml
- Fill in variables
REGION: aws-deploy-region (e.g. us-west-2)
STATION: canada-bc-station-number
ROLLBAR_ACCESS_TOKEN: your-rollbar-token (optional)
SLACK_CHANNEL: your-slack-channel
SLACK_WORKSPACE: your-slack-workspace
SLACK_SESSION_TOKEN: your-slack-session-token
Pick a region from the aws availability zones.
Go to https://envistaweb.env.gov.bc.ca/,
search for the desired station, click it and then copy the corresponding number from the url, e.g. 9
for
Kelowna College`.
Sign up for Rollbar, create a new Project and use a server token. This is optional - if you prefer not to enable monitoring you can simply set this to an empty string (""
).
Pick a Channel from your slack workspace.
Use your Slack Workspace.
Follow the instructions provided here.
Requires you to have an AWS account setup and credentials configured.
npm t && npm run clean-build && sls deploy --config=[FILL CONFIG NAME] && npm run clean