Skip to content

NiteSpaceDev/hubot-dynamodb-brain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hubot-dynamodb-brain

A hubot brain built on DynamoDB

See src/dynamodb-brain.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-dynamodb-brain --save

Then add hubot-dynamodb-brain to your external-scripts.json:

[
  "hubot-dynamodb-brain"
]

Defaults:

This brain is written with the assumption that the hubot instance is running on an AWS instance, with an instance role that allows access to the 'hubotbrain' table in the us-east-2 region. Environment variables are available to override.

The following CloudFormation YAML will create a suitable table in DynamoDB:

HubotBrainDynamo:
    Type: "AWS::DynamoDB::Table"
    Properties:
      TableName: hubotbrain
      AttributeDefinitions:
        - AttributeName: "botname"
          AttributeType: "S"
      KeySchema:
        - AttributeName: "botname"
          KeyType: "HASH"
      ProvisionedThroughput:
        ReadCapacityUnits: 1
        WriteCapacityUnits: 1

Sample Interaction

user1>> hubot brainscan
hubot>> My brain is doing great!

NPM Module

https://www.npmjs.com/package/hubot-dynamodb-brain