Skip to content

Use AWS Lambda (not heroku or on-permise machine) to forward message to Slack from SNS

Notifications You must be signed in to change notification settings

starrlingo/aws-sns-to-slack-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

AWS-SNS-To-Slack-hook

Use AWS Lambda (not heroku or on-permise machine) to forward message to Slack from SNS

Why I use AWS Lambda not heroku or any other service:

  • Cheapest (1 million request only cost 0.20 USD. It is the cheapest service than any cloud-provider service)
  • Build-in integration with SNS trigger
  • Low maintaining effort

Preparing

  • Prepare the IAM Execution Role. For example:
  {
    "Version": "2012-10-17",
    "Statement": [
    {
        "Effect": "Allow",
        "Action": [
          "sns:GetTopicAttributes",
          "sns:List*"
        ],
        "Resource": "*"
      }
    ]
  } 
  • Prepare the Slack web-incoming-webhook url
    1. Create a channel for aws-sns in slack
    2. add a Incoming WebHooks service integration
    3. get the webhook url

Create Lambda Function with sns-slack.js code

AWS SNS Topic Subscription for AWS Lambda

  • Select topic you want and subscirpt to it
  • select AWS Lambda as Protocol and select Lambda function

About

Use AWS Lambda (not heroku or on-permise machine) to forward message to Slack from SNS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published