{"id":22796288,"url":"https://github.com/makerxstudio/cloudwatch-error-alarms","last_synced_at":"2026-05-05T00:38:11.553Z","repository":{"id":54476834,"uuid":"522396727","full_name":"MakerXStudio/cloudwatch-error-alarms","owner":"MakerXStudio","description":"CDK and lambda wrapper to send error alarms to Slack","archived":false,"fork":false,"pushed_at":"2024-01-24T08:39:05.000Z","size":415,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-04-25T11:03:30.647Z","etag":null,"topics":["aws","cloudwatch","error-alarms","lambda","npm","oss","package","slack","typescript"],"latest_commit_sha":null,"homepage":"https://makerxstudio.github.io/cloudwatch-error-alarms","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MakerXStudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-08-08T03:50:37.000Z","updated_at":"2024-04-25T11:03:30.647Z","dependencies_parsed_at":"2024-01-11T13:31:16.618Z","dependency_job_id":"fc09d37a-bfbc-4bbf-a14c-74c8a3590007","html_url":"https://github.com/MakerXStudio/cloudwatch-error-alarms","commit_stats":{"total_commits":23,"total_committers":5,"mean_commits":4.6,"dds":0.3913043478260869,"last_synced_commit":"a305f0a05304ddfd14ac06b3ea060946acd9d1f7"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fcloudwatch-error-alarms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fcloudwatch-error-alarms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fcloudwatch-error-alarms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MakerXStudio%2Fcloudwatch-error-alarms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MakerXStudio","download_url":"https://codeload.github.com/MakerXStudio/cloudwatch-error-alarms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246358321,"owners_count":20764366,"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","cloudwatch","error-alarms","lambda","npm","oss","package","slack","typescript"],"created_at":"2024-12-12T05:11:49.206Z","updated_at":"2026-05-05T00:38:11.495Z","avatar_url":"https://github.com/MakerXStudio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudwatch Error Alarms (cloudwatch-error-alarms)\n\nCDK and lambda wrapper to send error alarms to Slack. This project inclues:\n\n- A lambda that is invoked by cloud watch message to send alert to Slack\n- AWS CDK to deploy and configure the lambda\n\n[![npm package][npm-img]][npm-url]\n[![Build Status][build-img]][build-url]\n[![Downloads][downloads-img]][downloads-url]\n[![Issues][issues-img]][issues-url]\n[![Semantic Release][semantic-release-img]][semantic-release-url]\n\n## Install\n\n```bash\nnpm install @makerx/cloudwatch-error-alarms --save\n```\n\n## Usage\n\nIn your CDK stack, create the lambda with `CloudWatchErrorAlarmLambda` and subscribe it to the log group for error level messages.\n\n```\nimport { CloudWatchErrorAlarmLambda } from '@makerx/cloudwatch-error-alarms'\nimport * as destinations from 'aws-cdk-lib/aws-logs-destinations'\nimport { FilterPattern } from 'aws-cdk-lib/aws-logs'\n\n// My lambda to monitor\nconst lambda = new lambda.Function(...)\n\n// Set up error lambda to post to Slack\nconst errorsLambda = new CloudWatchErrorAlarmLambda(this, `${id}-cloud-watch-error-alarms`, {\n  erroringFunctionName: lambda.functionName,\n  functionName: `${id}-cloud-watch-error-alarms`, // The cloud watch error alarm lambda function name\n  slackWebhookUrl: `${slackWebhookUrl}`, // Slack webhook https://slack.com/intl/en-au/help/articles/115005265063-Incoming-webhooks-for-Slack\n  errorFilterRegexes: [\n    // Regex to ignore error messages\n  ],\n})\n\n// Allow cloud watch to trigger the alarm lambda on error\nlambda.logGroup.addSubscriptionFilter(`${id}-cloud-watch-error-alarms-subscription`, {\n  destination: new destinations.LambdaDestination(errorsLambda),\n  filterPattern: FilterPattern.stringValue('$.level', '=', 'error'),\n})\n```\n\n## For developers\n\n### Structure\n\n**`index.ts`**  \nis the entry point of the packaage\n\n**`infrastructure.ts`**  \ncontains AWS CDK to configure the error alarm lambda\n\n**`lambda` folder**  \nStandalone package that has everything needed for the AWS lambda:\n\n- it's own `package.json`\n- build script to produce a package that can be deploy to AWS lambda and run\n\n### How the build works\n\nAt the root level, `npm run build` does:\n\n- Run build for the lambda then copy the output to `./build`\n- Run `tsc` for `index.ts` and `infrastructure.ts` into `./build`\n  The `build` folder in the content of the NPM package.\n\n[build-img]: https://github.com/MakerXStudio/cloudwatch-error-alarms/actions/workflows/release.yml/badge.svg\n[build-url]: https://github.com/MakerXStudio/cloudwatch-error-alarms/actions/workflows/release.yml\n[downloads-img]: https://img.shields.io/npm/dt/@MakerXStudio/cloudwatch-error-alarms\n[downloads-url]: https://www.npmtrends.com/@makerx/cloudwatch-error-alarms\n[npm-img]: https://img.shields.io/npm/v/@makerx/cloudwatch-error-alarms\n[npm-url]: https://www.npmjs.com/package/@makerx/cloudwatch-error-alarms\n[issues-img]: https://img.shields.io/github/issues/MakerXStudio/cloudwatch-error-alarms\n[issues-url]: https://github.com/MakerXStudio/cloudwatch-error-alarms/issues\n[semantic-release-img]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n[semantic-release-url]: https://github.com/semantic-release/semantic-release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerxstudio%2Fcloudwatch-error-alarms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakerxstudio%2Fcloudwatch-error-alarms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakerxstudio%2Fcloudwatch-error-alarms/lists"}