{"id":13820336,"url":"https://github.com/rkr2017/emr-slack-notify","last_synced_at":"2025-05-16T07:33:58.131Z","repository":{"id":216969295,"uuid":"112479914","full_name":"rkr2017/emr-slack-notify","owner":"rkr2017","description":"AWS Lambda function to send EMR events to Slack via SNS","archived":false,"fork":false,"pushed_at":"2017-11-30T10:34:03.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-11-19T19:44:18.928Z","etag":null,"topics":["aws","aws-lambda","cloudwatch-events","emr","emr-cluster","lambda-functions","slack"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rkr2017.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-29T13:39:26.000Z","updated_at":"2020-05-15T01:29:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4d9da3e-ae81-4f18-bcf8-65fb58df1941","html_url":"https://github.com/rkr2017/emr-slack-notify","commit_stats":null,"previous_names":["rkr2017/emr-slack-notify"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkr2017%2Femr-slack-notify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkr2017%2Femr-slack-notify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkr2017%2Femr-slack-notify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkr2017%2Femr-slack-notify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rkr2017","download_url":"https://codeload.github.com/rkr2017/emr-slack-notify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254488795,"owners_count":22079500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-lambda","cloudwatch-events","emr","emr-cluster","lambda-functions","slack"],"created_at":"2024-08-04T08:01:01.613Z","updated_at":"2025-05-16T07:33:55.355Z","avatar_url":"https://github.com/rkr2017.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# emr-slack-notify\n##### This function is to send the EMR Events captured by CloudWatch Events service `via SNS` to a public Slack channel using the Incoming WebHooks feature\n\n## Setup\n\n1. Create a NodeJS Lambda function using the code available\n2. Configure Environment Variables - SLACK_CHANNEL and SLACK_WEBHOOK_PATH (only the part from /services/..)\n3. Create an SNS topic\n3. Enable CloudWatch Event rules (shown below) for EMR clusters and choose the above created SNS topic as a Target\n4. Add SNS as a Trigger for the Lambda function\n\n\n# cloudwatch-to-slack\n##### This function is to send the EMR Events captured by CloudWatch Events service to a public Slack channel using the Incoming WebHooks feature\n\n## Setup\n\n1. Create a NodeJS Lambda function using the code available\n2. Configure Environment Variables - SLACK_CHANNEL and SLACK_WEBHOOK_PATH (only the part from /services/..)\n3. Enable CloudWatch Event rules for EMR clusters and choose the above created Lambda function as a Target.\n\n#### CloudWatch Sample Rules\n\n##### EMR-Cluster-Change event -\n\n```\n{\n  \"source\": [\n    \"aws.emr\"\n  ],\n  \"detail-type\": [\n    \"EMR Cluster State Change\"\n  ],\n  \"detail\": {\n    \"state\": [\n      \"RUNNING\",\n      \"TERMINATED\",\n      \"TERMINATED_WITH_ERRORS\"\n    ]\n  }\n}\n```\n\n##### EMR-State-Change event -\n\n```\n{\n  \"source\": [\n    \"aws.emr\"\n  ],\n  \"detail-type\": [\n    \"EMR Step Status Change\"\n  ],\n  \"detail\": {\n    \"state\": [\n      \"RUNNING\",\n      \"COMPLETED\",\n      \"CANCELLED\",\n      \"FAILED\"\n    ]\n  }\n}\n```\n\n\n\n###### References\n\n1. http://matthewcooper.net/2015/08/21/aws-cloudwatch-to-slack-via-api-gateway-and-lambda/\n2. https://medium.com/cohealo-engineering/how-set-up-a-slack-channel-to-be-an-aws-sns-subscriber-63b4d57ad3ea\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkr2017%2Femr-slack-notify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frkr2017%2Femr-slack-notify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkr2017%2Femr-slack-notify/lists"}