{"id":13820317,"url":"https://github.com/ashiina/aws-lambda-cloudwatch-slack","last_synced_at":"2026-01-31T13:49:49.452Z","repository":{"id":33451771,"uuid":"37097168","full_name":"ashiina/aws-lambda-cloudwatch-slack","owner":"ashiina","description":"Amazon Lambda to receive data from CloudWatch and post to Slack","archived":false,"fork":false,"pushed_at":"2017-04-26T13:05:09.000Z","size":5,"stargazers_count":86,"open_issues_count":2,"forks_count":35,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-19T19:44:16.081Z","etag":null,"topics":[],"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/ashiina.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}},"created_at":"2015-06-08T22:48:35.000Z","updated_at":"2023-11-14T17:14:26.000Z","dependencies_parsed_at":"2022-09-08T12:21:44.737Z","dependency_job_id":null,"html_url":"https://github.com/ashiina/aws-lambda-cloudwatch-slack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashiina%2Faws-lambda-cloudwatch-slack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashiina%2Faws-lambda-cloudwatch-slack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashiina%2Faws-lambda-cloudwatch-slack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashiina%2Faws-lambda-cloudwatch-slack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashiina","download_url":"https://codeload.github.com/ashiina/aws-lambda-cloudwatch-slack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254488771,"owners_count":22079491,"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":[],"created_at":"2024-08-04T08:01:01.374Z","updated_at":"2026-01-31T13:49:49.420Z","avatar_url":"https://github.com/ashiina.png","language":"JavaScript","readme":"# lambda-cloudwatch-slack\nAmazon Lambda to receive alerts from CloudWatch and post to Slack.\n\n## What is This?\nIt's an Amazon lambda script that receives data from Amazon CloudWatch via, then posts that result over to Slack.\nJust configure the javascript file and set it in Lambda, then you are good to go.\n\n## How to Use\n### Alarm configuration\nIn `handler.js`, you will find `ALARM_CONFIG`, which is the config for your alarms.\nYou can set different configs for different alarm conditions, depending on the\n*subject of* the CloudWatch notification.\n\n| name | description |\n|:-----------|:------------|\n| condition | The script will match the CloudWatch's subject for this value |\n| channel | Which channel to post to |\n| mention | any mentions you will want to direct it at |\n| color | color of the sidebar when posted in slack |\n| severity | Optional text indicating the severity, just displayed in the message |\n\n### Slack configuration\nIn `handler.js`, you will find `SLACK_CONFIG`, which is the config for you Slack.\nSet the correct values in this.\n\n| name | description |\n|:-----------|:------------|\n| path | The path of your webhook URL. |\n\n\nIf you have trouble finding the above,\nGo here to set up your *Incoming Webbhook* integration for Slack,\nhttps://api.slack.com/incoming-webhooks\nThen find your *Webhook URL*. The configs will be:\n```\nhttps://hooks.slack.com/{path}\n```\n\n### Amazon CloudWatch configuration\nSet whatever CloudWatch you want in your CloudWatch settings.\nBe sure to remember the SNS topic you send the alarms to.\n\n### Amazon Lambda configuration\n1. In the Lambda console panel, create a new Lambda function. Set the name to be whatever you want it to be.\n2. For the code of the Lambda function, copy and paste the `handler.js` file.\n3. After you have created the function, select *add event sources* for the Lambda function.\n4. In the event sources, select *SNS* and select the topic for which you've created on CloudWatch.\n\nThat is all. You should be receiving CloudWatch alerts on your Slack.\n\n## Testing, Debugging\nWhen you want to debug/test your Lambda function, try using my `lambda-local` NPM.\nIt's a command-line tool that let's you execute Lambda functions on your local machine.\nhttps://github.com/ashiina/lambda-local\n\n## License\nThis library is released under the MIT license.\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashiina%2Faws-lambda-cloudwatch-slack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashiina%2Faws-lambda-cloudwatch-slack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashiina%2Faws-lambda-cloudwatch-slack/lists"}