Skip to content

this is a lambda function for sending slack message at any chanel.

Notifications You must be signed in to change notification settings

amitrahav/AWS-Lambda-Slack-Messager

Repository files navigation

Slack Messager for Aws lambda

this is a lambda function for sending slack message at any chanel.

##usage

  • create empty node v6.10.3 lambda function named codeDeploySlackWebhook.
  • authorize aws cli.
  • run $ source zipandload.sh it will create codeDeploySlackWebhook.zip and deploy the function.
  • you can use aither codepipline parameters or lambda env vars.
  • codepipline user paramters usage:
    • edit satge at code deploy. under aws lambda function name, input at the user paremetrs input this kind of json: { "message" : "some slack message", "url" : "the webapp endpoint url", "channel" : "#slack channel" "slackwebhook" : "the webhook ul" }
  • lambda env veribals to set details:
  • the notification displayed next to screaming cat icon.
  • don't forget to attach aws role the lambda:ListFunctions premmision.

##develop

  • run nvm use in case you using nvm. - this is important because only specific node versions are allowed at lambda.
  • you can test function localy on index_ex.js
  • index.js is wrapped with lambda handler.
  • rebuild zip and upload it to lambda by the name "codeDeploySlackWebhook" by running $source zipandload.sh

About

this is a lambda function for sending slack message at any chanel.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages