Skip to content

An Amazon Lambda function that publishes messages to a Slack channel when an Amazon IoT button is pressed.

License

Notifications You must be signed in to change notification settings

jmorrison1847/coffee-button

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coffee-button

Build Status Apache V2 License

An Amazon Lambda function that publishes messages to a configured Slack channel when an Amazon IoT button is pressed.

Table of Contents

Configuration

The following environment variables can be used to dictate which Slack webhook URL and channel are used:

  • COFFEE_BUTTON_SLACK_WEBHOOK_URL: Slack webhook URL
  • COFFEE_BUTTON_SLACK_CHANNEL: Slack channel to send messages to
  • COFFEE_BUTTON_FUNCTION_ALIAS: When deploying, the alias associated with the Lambda function

Testing

Function testing occurs within a Docker container and is driven by make:

$ make test

Deployment

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.

About

An Amazon Lambda function that publishes messages to a Slack channel when an Amazon IoT button is pressed.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 78.4%
  • Makefile 21.6%