Skip to content

chatwork/lambda-sns-to-chatwork-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lambda-sns-to-chatwork-function

Build Status Dependency Status devDependency Status

Notify the SNS to chatwork.

image

Get started

git clone https://github.com/chatwork/lambda-sns-to-chatwork-function
cd lambda-sns-to-chatwork-function
echo '{
  "token": "[ChatWork API Token]",
  "roomId": [ChatWork Room ID],
  "template": "[Notify Message]"
}' > config/local.json
npm install
npm start # Notify the example events

Configuration

You will generate config/local.json.

name type value
CHATWORK_API_TOKEN string ChatWork API Token
CHATWORK_SEND_ROOM_ID int ID of the room to be sent to the ChatWork
CHATWORK_MESSAGE_TEMPLATE string The format of the message to be sent to the ChatWork (e.g. <%- Message %>)

Or please create a config/local.json

{
  "token": "[ChatWork API Token]",
  "roomId": [Send Room ID],
  "template": "[Message format]"
}

Deployment

Manual deploy

  1. git clone https://github.com/chatwork/lambda-sns-to-chatwork-function.git
  2. Generate config/local.json
  3. Run the npm run archive tasks
  4. It will upload the archive.zip as Lambda Function
  5. Add the SNS to the event source

Jenkins

  1. wget https://github.com/chatwork/lambda-sns-to-chatwork-function/archive/0.0.0.zip
  2. Generate config/local.json
  3. zip 0.0.0.zip config/local.json
  4. It will upload the 0.0.0.zip to S3
  5. To deploy the Lambda Function using the AWS Lambda Plugin

TravisCI

  1. To fork
  2. Add configuration value to .travis.yml of env
  3. Add npm run template to .travis.yml of after_success
  4. Add deployment configuration to .travis.yml (e.g. https://github.com/travis-ci/dpl#lambda)

License

MIT

Copyright

Copyright (c) 2015 ChatWork.inc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published