[![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
// for CDKv1
npm install cdk-events-notify@cdkv1
```
## π‘π‘π‘ 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/ac/b3/527b104c64465c7260f16ce3ed632258c9b67f52ac8e4decab8bbdcef570/cdk-events-notify-2.2.110.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// for CDKv1\nnpm install cdk-events-notify@cdkv1\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.110",
"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": "6437780d5a8e6408d996b0d776c05f38140f33c214183e9f0376c9de660ed50e",
"md5": "83086f3f374642237871b98ce4dd4a94",
"sha256": "17b7b06c1e8fad6437bf4f1c3bcd510edfa6325c120fd77a7c07b37cb2ed26f7"
},
"downloads": -1,
"filename": "cdk_events_notify-2.2.110-py3-none-any.whl",
"has_sig": false,
"md5_digest": "83086f3f374642237871b98ce4dd4a94",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.8",
"size": 35484,
"upload_time": "2024-04-27T00:12:14",
"upload_time_iso_8601": "2024-04-27T00:12:14.458742Z",
"url": "https://files.pythonhosted.org/packages/64/37/780d5a8e6408d996b0d776c05f38140f33c214183e9f0376c9de660ed50e/cdk_events_notify-2.2.110-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "acb3527b104c64465c7260f16ce3ed632258c9b67f52ac8e4decab8bbdcef570",
"md5": "a1b167c15296a205c9a15bd2c2a95755",
"sha256": "e1e053f0fadd9ceaefbf9d4b28309d407d35cc6c71660c99f0ee21230d0a9605"
},
"downloads": -1,
"filename": "cdk-events-notify-2.2.110.tar.gz",
"has_sig": false,
"md5_digest": "a1b167c15296a205c9a15bd2c2a95755",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.8",
"size": 36959,
"upload_time": "2024-04-27T00:12:27",
"upload_time_iso_8601": "2024-04-27T00:12:27.284161Z",
"url": "https://files.pythonhosted.org/packages/ac/b3/527b104c64465c7260f16ce3ed632258c9b67f52ac8e4decab8bbdcef570/cdk-events-notify-2.2.110.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-27 00:12:27",
"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"
}