JSPM

hubot-lambda

0.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q31113F
  • License MIT

A Hubot script for invoking AWS Lambda functions

Package Exports

  • hubot-lambda

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hubot-lambda) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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