An Amazon Lambda function that publishes messages to a configured Slack channel when an Amazon IoT button is pressed.
The following environment variables can be used to dictate which Slack webhook URL and channel are used:
COFFEE_BUTTON_SLACK_WEBHOOK_URL
: Slack webhook URLCOFFEE_BUTTON_SLACK_CHANNEL
: Slack channel to send messages toCOFFEE_BUTTON_FUNCTION_ALIAS
: When deploying, the alias associated with the Lambda function
Function testing occurs within a Docker container and is driven by make
:
$ make test
Function deployment will occurs automatically via Travis CI. If you choose to execute deployments manually, execute the following steps:
$ export COFFEE_BUTTON_SLACK_WEBHOOK_URL="https://hooks.slack.com/..."
$ export COFFEE_BUTTON_SLACK_CHANNEL="#general"
$ export COFFEE_BUTTON_FUNCTION_ALIAS="staging"
$ export AWS_SECRET_ACCESS_KEY="..."
$ export AWS_ACCESS_KEY_ID="..."
$ make deploy
This deployment process makes use of make
and Apex to publish the function to Amazon Lambda.