Skip to content

AWS SNS to slack notifications handler for AWS Lambda

License

Notifications You must be signed in to change notification settings

jakubknejzlik/sns2slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sns2slack

AWS SNS to slack notifications handler for AWS Lambda

Installation

Assuming you already have SNS topic with subscribed lambda...

  1. Create node project and add dependency: npm install sns2slack

  2. Create index.js file with following content:

const sns2slack = require("sns2slack");

exports.handler = sns2slack();
  1. Zip your project file and upload it to AWS Lambda.

  2. Setup environment variables:

  • SLACK_URL - slack webhook integration url
  • SLACK_ENCRYPTED_URL - AWS KMS encrypted value of SLACK_URL
  • SLACK_CHANNEL - default slack channel name (you can override this value by map function)
  • SLACK_USER_NAME - slack user name (default: AWS SNS)
  • SLACK_USER_ICON - slack user icon (default: :aws:)

Reference

sns2slack(options): lambda handler function

options:

  • map(snsMessage): optional function for transforming and filtering messages (return null to filter the log)

About

AWS SNS to slack notifications handler for AWS Lambda

Resources

License

Stars

Watchers

Forks

Packages

No packages published