[![NPM version](https://badge.fury.io/js/cdk-events-notify.svg)](https://badge.fury.io/js/cdk-events-notify)
[![PyPI version](https://badge.fury.io/py/cdk-events-notify.svg)](https://badge.fury.io/py/cdk-events-notify)
![Release](https://github.com/neilkuan/cdk-s3bucket/workflows/release/badge.svg)
![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray)
![npm](https://img.shields.io/npm/dt/cdk-events-notify?label=npm&color=orange)
![PyPI](https://img.shields.io/pypi/dm/cdk-events-notify?label=pypi&color=blue)
# cdk-events-notify
`cdk-events-notify` is an AWS CDK Construct Library that provides you know who login in your aws console.
## Why
Itβs just a small feature at the moment,
Provides you to trigger Lambda Function push notifications to Line Notify or Slack when you discover Console Login event or swith role event through Cloudtrail.
> Welcome to contribute another event notify case you want.
## Overview
![](./images/overview.png)
### Now support
* Line Notify
* Slack ([webhooks](https://api.slack.com/messaging/webhooks#posting_with_webhooks))
## You need enable one `Management events` in your account.
> more see https://aws.amazon.com/tw/cloudtrail/pricing/
> ![](./images/management-events.png)
# You need Line Notify access token
> more see [line notify docs](https://notify-bot.line.me/doc/en/)
![](./images/access-token.png)
## Install
```bash
Use the npm dist tag to opt in CDKv1 or CDKv2:
// for CDKv2
npm install cdk-events-notify
or
npm install cdk-events-notify@latest
```
## π‘π‘π‘ please click [here](https://github.com/neilkuan/cdk-events-notify/tree/cdkv1#readme), if you are using aws-cdk v1.x.x version.π‘π‘π‘
## Usage
```python
import * as cdk from 'aws-cdk-lib';
import { EventNotify } from 'cdk-events-notify';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'integ-stack', { env });
new EventNotify(stack, 'LineEventNotify', { lineNotifyToken: process.env.LINE_NOTIFY_TOKEN });
```
### To deploy
```bash
cdk deploy
```
### To destroy
```bash
cdk destroy
```
### Finally
* line
![](./images/line-chat.jpg)
* slack
![](./images/slack.jpg)
## More about EventBridge and Lambda
* [EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/aws-events.html)
* [Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)
> Note: Event Bridge can not cross region , if you console sign in not the cdk-events-notify region will not get the evnet in cloudtrail see this [docs](https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-regions)
## :clap: Supporters
[![Stargazers repo roster for @neilkuan/cdk-events-notify](https://reporoster.com/stars/neilkuan/cdk-events-notify)](https://github.com/neilkuan/cdk-events-notify/stargazers)
[![Forkers repo roster for @neilkuan/cdk-events-notify](https://reporoster.com/forks/neilkuan/cdk-events-notify)](https://github.com/neilkuan/cdk-events-notify/network/members)
Raw data
{
"_id": null,
"home_page": "https://github.com/neilkuan/cdk-events-notify.git",
"name": "cdk-events-notify",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.8",
"maintainer_email": null,
"keywords": null,
"author": "Neil Kuan<guan840912@gmail.com>",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/27/2e/8b6fe48a512ebfd78022598213afee2c0028e01cbdbeec83a99faf3c16d4/cdk_events_notify-2.2.263.tar.gz",
"platform": null,
"description": "[![NPM version](https://badge.fury.io/js/cdk-events-notify.svg)](https://badge.fury.io/js/cdk-events-notify)\n[![PyPI version](https://badge.fury.io/py/cdk-events-notify.svg)](https://badge.fury.io/py/cdk-events-notify)\n![Release](https://github.com/neilkuan/cdk-s3bucket/workflows/release/badge.svg)\n\n![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray)\n![npm](https://img.shields.io/npm/dt/cdk-events-notify?label=npm&color=orange)\n![PyPI](https://img.shields.io/pypi/dm/cdk-events-notify?label=pypi&color=blue)\n\n# cdk-events-notify\n\n`cdk-events-notify` is an AWS CDK Construct Library that provides you know who login in your aws console.\n\n## Why\n\nIt\u2019s just a small feature at the moment,\nProvides you to trigger Lambda Function push notifications to Line Notify or Slack when you discover Console Login event or swith role event through Cloudtrail.\n\n> Welcome to contribute another event notify case you want.\n\n## Overview\n\n![](./images/overview.png)\n\n### Now support\n\n* Line Notify\n* Slack ([webhooks](https://api.slack.com/messaging/webhooks#posting_with_webhooks))\n\n## You need enable one `Management events` in your account.\n\n> more see https://aws.amazon.com/tw/cloudtrail/pricing/\n> ![](./images/management-events.png)\n\n# You need Line Notify access token\n\n> more see [line notify docs](https://notify-bot.line.me/doc/en/)\n\n![](./images/access-token.png)\n\n## Install\n\n```bash\nUse the npm dist tag to opt in CDKv1 or CDKv2:\n\n// for CDKv2\nnpm install cdk-events-notify\nor\nnpm install cdk-events-notify@latest\n```\n\n## \ud83d\udca1\ud83d\udca1\ud83d\udca1 please click [here](https://github.com/neilkuan/cdk-events-notify/tree/cdkv1#readme), if you are using aws-cdk v1.x.x version.\ud83d\udca1\ud83d\udca1\ud83d\udca1\n\n## Usage\n\n```python\nimport * as cdk from 'aws-cdk-lib';\nimport { EventNotify } from 'cdk-events-notify';\n\nconst app = new cdk.App();\nconst stack = new cdk.Stack(app, 'integ-stack', { env });\nnew EventNotify(stack, 'LineEventNotify', { lineNotifyToken: process.env.LINE_NOTIFY_TOKEN });\n```\n\n### To deploy\n\n```bash\ncdk deploy\n```\n\n### To destroy\n\n```bash\ncdk destroy\n```\n\n### Finally\n\n* line\n ![](./images/line-chat.jpg)\n* slack\n ![](./images/slack.jpg)\n\n## More about EventBridge and Lambda\n\n* [EventBridge](https://docs.aws.amazon.com/eventbridge/latest/userguide/aws-events.html)\n* [Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)\n\n> Note: Event Bridge can not cross region , if you console sign in not the cdk-events-notify region will not get the evnet in cloudtrail see this [docs](https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-regions)\n\n## :clap: Supporters\n\n[![Stargazers repo roster for @neilkuan/cdk-events-notify](https://reporoster.com/stars/neilkuan/cdk-events-notify)](https://github.com/neilkuan/cdk-events-notify/stargazers)\n[![Forkers repo roster for @neilkuan/cdk-events-notify](https://reporoster.com/forks/neilkuan/cdk-events-notify)](https://github.com/neilkuan/cdk-events-notify/network/members)\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "The Events Notify AWS Construct lib for AWS CDK",
"version": "2.2.263",
"project_urls": {
"Homepage": "https://github.com/neilkuan/cdk-events-notify.git",
"Source": "https://github.com/neilkuan/cdk-events-notify.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a3552552b0e3571b24ff35cf5b6008bd19801d68b0b857f3c6a7bfa0e40ec9dc",
"md5": "d92f9a82514f4103e982d24a1f534a2e",
"sha256": "190a578b3750b819b314052705158ba5b3b498e1398bf87eb3e205ccb8f977b3"
},
"downloads": -1,
"filename": "cdk_events_notify-2.2.263-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d92f9a82514f4103e982d24a1f534a2e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.8",
"size": 36706,
"upload_time": "2024-10-09T00:13:48",
"upload_time_iso_8601": "2024-10-09T00:13:48.110971Z",
"url": "https://files.pythonhosted.org/packages/a3/55/2552b0e3571b24ff35cf5b6008bd19801d68b0b857f3c6a7bfa0e40ec9dc/cdk_events_notify-2.2.263-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "272e8b6fe48a512ebfd78022598213afee2c0028e01cbdbeec83a99faf3c16d4",
"md5": "a48998f009c3145e685c1ec2b4d84950",
"sha256": "7a4e3c7e680f719f32b211673790a1cb9a4705b1c4a1d9bbffb9dd8cf9d23ae7"
},
"downloads": -1,
"filename": "cdk_events_notify-2.2.263.tar.gz",
"has_sig": false,
"md5_digest": "a48998f009c3145e685c1ec2b4d84950",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.8",
"size": 38008,
"upload_time": "2024-10-09T00:13:49",
"upload_time_iso_8601": "2024-10-09T00:13:49.867102Z",
"url": "https://files.pythonhosted.org/packages/27/2e/8b6fe48a512ebfd78022598213afee2c0028e01cbdbeec83a99faf3c16d4/cdk_events_notify-2.2.263.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-09 00:13:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "neilkuan",
"github_project": "cdk-events-notify",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "cdk-events-notify"
}