GithubHelp home page GithubHelp logo

imranansari / slack-bot-lex-lambda Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nicholasjackson/slack-bot-lex-lambda

0.0 2.0 0.0 30 KB

Example slack bot using AWS Lambda and Lex

Makefile 3.76% JavaScript 71.42% HCL 24.83%

slack-bot-lex-lambda's Introduction

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/.

This project does not use any frameworks such as Serverless or Apex. It is a plain example which uses Terraform to deploy the Lambda function.

Requirements:

Caviates

  • I am not a JavaScript programmer
  • This not a comprehensive example but more of a getting started
  • Deployment to AWS may incur costs

Building

The code is written in Javascript and requires no building as such however there is a build step which will copy the required files and install the node modules ready for packaging to AWS Lambda.

$ make build

Testing

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.

Deploying

Set the following environment variables I recommend using direnv https://direnv.net:

Variable Description
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

Run...

$ make deploy

The function will be deployed to us-east-1 virginia which is currently the only region which supports Lex.

slack-bot-lex-lambda's People

Contributors

nicholasjackson avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.