Skip to content

saraspahi/Slack-Integration

Repository files navigation


Slack-Integration


This project sends messages from a SNS topic to Slack using an AWS Lambda function which is subscribed to the SNS topic.

Explore the docs »

Table of Contents
  1. About The Project
  2. Installation
  3. Deployment

About The Project

In the current implementation AWS CDK is used to built the cloud infrastructure. It creates a SNS topic and a Lambda function in your AWS account. The lambda function subscribes to the topic and therefore gets triggerd every time a new message is published to the SNS topic. The topic's message is then sent to a Slack channel of your preference using IncomingWebhooks.

Installation

  1. Create an IncomingWebHook from Slack api which will generate a WebHook url
  2. Clone the repo
    git clone [email protected]:ServerCentral/Slack-Integration.git
  3. Install NPM packages
    npm install
  4. Copy .env.example file in the root .env file. Modify the path by adding the path from your WebHook url Example: WebHook url = https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
 WEBHOOKSPATH = /services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

Deployment

AWS CDK defines the cloud infrastructure and the code in slack-integration-stack.js creates cloud resources within stacks.

Useful cdk commands
  • cdk synth Synthesizes and prints the CloudFormation template for the specified stack(s)
  • cdk diff Compares the specified stack with the deployed stack or a local CloudFormation template
  • cdk deploy cdk deploys the slack-integration-stack

Run the above commands from slack-integration directory

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published