Stack Overflow Monitor
A simple serverless app to monitor Stack Overflow in Slack.
This Pulumi application will create a DynamoDB table and a Lambda Function that will run every 20 minutes, querying StackOverflow, saving the results to the database, and outputting them to a Slack channel.
Pre-requisites
- Pulumi configured for AWS
- A Slack team with an Incoming Webhook
- A Stack Exchange API Key
Deploying and running the Pulumi App
-
Create a new stack:
$ pulumi stack init stackOverflowMonitor
-
Set the AWS region:
$ pulumi config set aws:region us-east-1
-
Set the Slack channel to post to
$ pulumi config set slack:channel #stack-overflow
-
Set the Slack Webhook Url
$ pulumi config set slack:webhookUrl https://your.url
-
Set your Stack Exchange API Key as a secret
$ pulumi config set --secret stackOverflow:apiKey YOUR_API_KEY
-
Set the Keyword you are interested in monitoring
$ pulumi config set stackOverflow:searchKeyword pulumi
-
Restore NPM modules via
npm install
oryarn install
. -
Run
pulumi up
to preview and deploy changes
Clean up
-
Run
pulumi destroy
to tear down all resources. -
To delete the stack itself, run
pulumi stack rm
. Note that this command deletes all deployment history from the Pulumi Console.
Based on stackOverflowMonitor by Nicolas Grenié (@picsoung 🐼)