hubot-lambda

0.0.4 • Public • Published

hubot-lambda

Build Status

NPM

A Hubot script for invoking AWS Lambda functions

Why

  • Separate invocation privileges from execution privileges.
  • New languages will almost certainly be added to AWS Lambda, in this case hubot-lambda would enable easy cross language Hubot integrations.
  • Potentially a robust mechanism for enabling ad-hoc hubot script additions/modifications without recycling the hubot process. (I'd like some feedback on this one)

Installation

Add hubot-lambda to your package.json, run npm install and add hubot-lambda to external-scripts.json.

Add hubot-lambda to your package.json dependencies.

"dependencies": {
  "hubot-lambda": "0.0.0"
}

Add hubot-lambda to external-scripts.json.

> cat external-scripts.json
> ["hubot-lambda"]
Required ENV Variables
> export HUBOT_LAMBDA_AWS_ACCESS_KEY_ID="XXXX"
> export HUBOT_LAMBDA_AWS_SECRET_ACCESS_KEY="XXXX"
Required AWS User Policy
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "lambda:InvokeFunction"
      ],
      "Resource": "*"
    }
  ]
}

Usage

  • hubot lambda <functionName> <arg1>

Example

  • hubot lambda helloWorld Yo

Developing hubot-lambda

Running from working dir

vagrant up
vagrant ssh
cd hubot
./bin/hubot
Troubleshooting

HUBOT_LOG_LEVEL=debug ./bin/hubot

Readme

Keywords

Package Sidebar

Install

npm i hubot-lambda

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • davemkirk