Slackbot with AWS Lex and Lambda
This repository contains an example of a slack bot with AWS Lex and Lambda, for details and a walk through on how this was created please read the blog post at: chttps://nicholasjackson.io/2017/04/25/slack-bot-aws-lambda/.
- Terraform 0.9 or greater http://terraform.io
- NodeJS 4.3 or greater
- Yarn https://yarnpkg.com/lang/en/
- This not a comprehensive example but more of a getting started
- Deployment to AWS may incur costs
$ make build
Testing is performed with Jest, to run the example tests:
$ make test
The tests are not comprehensive however and are intended to show how unit tests can be leveraged to cover the inability to run the application code locally with AWS Lambda.
Set the following environment variables I recommend using direnv https://direnv.net:
|TF_VAR_slack_api_key||A valid key to access the slack API|
|AWS_SECRET||The secret for your AWS account|
|AWS_SECRET_KEY||The secret key for your AWS account|
$ make deploy
The function will be deployed to
us-east-1 virginia which is currently the only region which supports Lex.