This is Slack bot for Redash.
- Running on AWS Lambda (so low-cost).
- Made with Bolt framework (Non-Socket Mode).
- Take a screenshot of query visualization or dashboard.
First, run local.js
to start Slack bot.
(customized app.js
to work locally since we can't emulate the API Gateway)
$ make setup
$ docker compose up
(Other Terminal)
$ open http://localhost:5000/users/me
# Login admin@example.com/password and get User API Key
$ make REDASH_API_KEY=your-redash-api-key sample_query_and_dashboard
Next, use ngrok to forward Slack events to your local machine.
$ ngrok http 3000
First, deploy to AWS by serverless framework.
$ npm install
$ cp .env.sample .env.dev
$ npx serverless deploy --stage dev
Next, edit a function as necessary on aws web console.
https://docs.aws.amazon.com/lambda/latest/dg/code-editor.html
In most cases, Redash is located in a VPC.
If Slack bot needs to access the VPC, uncomment vpc section of serverless.yml
.