gammarers.aws-sns-slack-message-lambda-subscription


Namegammarers.aws-sns-slack-message-lambda-subscription JSON
Version 1.0.15 PyPI version JSON
download
home_pagehttps://github.com/gammarers/aws-sns-slack-message-lambda-subscription.git
SummaryThis AWS CDK Construct is designed to post messages sent from an SNS topic to a Slack Webhook via a Lambda function.
upload_time2025-09-03 16:33:37
maintainerNone
docs_urlNone
authoryicr<yicr@users.noreply.github.com>
requires_python~=3.9
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AWS SNS Slack Message Lambda Subscription

[![GitHub](https://img.shields.io/github/license/gammarers/aws-sns-slack-message-lambda-subscription?style=flat-square)](https://github.com/gammarers/aws-sns-slack-message-lambda-subscription/blob/main/LICENSE)
[![npm (scoped)](https://img.shields.io/npm/v/@gammarers/aws-sns-slack-message-lambda-subscription?style=flat-square)](https://www.npmjs.com/package/@gammarers/aws-sns-slack-message-lambda-subscription)
[![PyPI](https://img.shields.io/pypi/v/gammarers.aws-sns-slack-message-lambda-subscription?style=flat-square)](https://pypi.org/project/gammarers.aws-sns-slack-message-lambda-subscription/)
[![Nuget](https://img.shields.io/nuget/v/Gammarers.CDK.AWS.SNSSlackMessageLambdaSubscription?style=flat-square)](https://www.nuget.org/packages/Gammarers.CDK.AWS.SNSSlackMessageLambdaSubscription/)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-sns-slack-message-lambda-subscription/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-sns-slack-message-lambda-subscription/actions/workflows/release.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-sns-slack-message-lambda-subscription?sort=semver&style=flat-square)](https://github.com/gammarers/aws-sns-slack-message-lambda-subscription/releases)

This AWS CDK Construct is designed to post messages sent from an SNS topic to a Slack Webhook via a Lambda function. The Lambda function accepts JSON text as a message, formats it for Slack, and sends it to the Slack Webhook API.

## Incoming Sample Message

![](./images/example.png)

## Installation

### TypeScript

#### install by npm

```shell
npm install @gammarers/aws-sns-slack-message-lambda-subscription
```

#### install by yarn

```shell
yarn add @gammarers/aws-sns-slack-message-lambda-subscription
```

### Python

```shell
pip install gammarers.aws-sns-slack-message-lambda-subscription
```

### C# / .NET

```shell
dotnet add package Gammarers.CDK.AWS.SNSSlackMessageLambdaSubscription
```

## Example

### Please save it in AWS Secrets Manager in the following format.

get your slack webhook url parts

```text
https://hooks.slack.com/services/<workspace>/<channel>/<whebook>
```

| SecretKey 	 | SecretValue 	   |
|-------------|-----------------|
| Workspace 	 | <workspace> 	 |
| Channel   	 | <channel>   	 |
| Webhook   	 | <whebook>   	 |

### Code

```python
import { SNSSlackMessageLambdaSubscription } from '@gammarer/aws-sns-slack-message-lambda-subscription';

declare const topic: sns.Topic;

new SNSSlackMessageLambdaSubscription(stack, 'SNSSlackMessageLambdaSubscription', {
  topic,
  slackWebhookSecretName: 'slak-webhook', // alredy saved slack webhook info.
});
```

```json
{
    "text": ":mega: *TEST*",
    "attachments": [{
        "color": "#2eb886",
        "title": "CodePipeline pipeline execution *SUCCEED*",
        "title_link": "https://github.com/yicr",
        "fields": [
            {
                "title": "Pipeline",
                "value": "pipeline-name"
            }
        ]
    }]
}
```

## License

This project is licensed under the Apache-2.0 License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gammarers/aws-sns-slack-message-lambda-subscription.git",
    "name": "gammarers.aws-sns-slack-message-lambda-subscription",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "yicr<yicr@users.noreply.github.com>",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/6f/b8/844cfe9873f91334c3038929bacd6264374a45595c87f66adaac576f4172/gammarers_aws_sns_slack_message_lambda_subscription-1.0.15.tar.gz",
    "platform": null,
    "description": "# AWS SNS Slack Message Lambda Subscription\n\n[![GitHub](https://img.shields.io/github/license/gammarers/aws-sns-slack-message-lambda-subscription?style=flat-square)](https://github.com/gammarers/aws-sns-slack-message-lambda-subscription/blob/main/LICENSE)\n[![npm (scoped)](https://img.shields.io/npm/v/@gammarers/aws-sns-slack-message-lambda-subscription?style=flat-square)](https://www.npmjs.com/package/@gammarers/aws-sns-slack-message-lambda-subscription)\n[![PyPI](https://img.shields.io/pypi/v/gammarers.aws-sns-slack-message-lambda-subscription?style=flat-square)](https://pypi.org/project/gammarers.aws-sns-slack-message-lambda-subscription/)\n[![Nuget](https://img.shields.io/nuget/v/Gammarers.CDK.AWS.SNSSlackMessageLambdaSubscription?style=flat-square)](https://www.nuget.org/packages/Gammarers.CDK.AWS.SNSSlackMessageLambdaSubscription/)\n[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/gammarers/aws-sns-slack-message-lambda-subscription/release.yml?branch=main&label=release&style=flat-square)](https://github.com/gammarers/aws-sns-slack-message-lambda-subscription/actions/workflows/release.yml)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/gammarers/aws-sns-slack-message-lambda-subscription?sort=semver&style=flat-square)](https://github.com/gammarers/aws-sns-slack-message-lambda-subscription/releases)\n\nThis AWS CDK Construct is designed to post messages sent from an SNS topic to a Slack Webhook via a Lambda function. The Lambda function accepts JSON text as a message, formats it for Slack, and sends it to the Slack Webhook API.\n\n## Incoming Sample Message\n\n![](./images/example.png)\n\n## Installation\n\n### TypeScript\n\n#### install by npm\n\n```shell\nnpm install @gammarers/aws-sns-slack-message-lambda-subscription\n```\n\n#### install by yarn\n\n```shell\nyarn add @gammarers/aws-sns-slack-message-lambda-subscription\n```\n\n### Python\n\n```shell\npip install gammarers.aws-sns-slack-message-lambda-subscription\n```\n\n### C# / .NET\n\n```shell\ndotnet add package Gammarers.CDK.AWS.SNSSlackMessageLambdaSubscription\n```\n\n## Example\n\n### Please save it in AWS Secrets Manager in the following format.\n\nget your slack webhook url parts\n\n```text\nhttps://hooks.slack.com/services/<workspace>/<channel>/<whebook>\n```\n\n| SecretKey \t | SecretValue \t   |\n|-------------|-----------------|\n| Workspace \t | <workspace> \t |\n| Channel   \t | <channel>   \t |\n| Webhook   \t | <whebook>   \t |\n\n### Code\n\n```python\nimport { SNSSlackMessageLambdaSubscription } from '@gammarer/aws-sns-slack-message-lambda-subscription';\n\ndeclare const topic: sns.Topic;\n\nnew SNSSlackMessageLambdaSubscription(stack, 'SNSSlackMessageLambdaSubscription', {\n  topic,\n  slackWebhookSecretName: 'slak-webhook', // alredy saved slack webhook info.\n});\n```\n\n```json\n{\n    \"text\": \":mega: *TEST*\",\n    \"attachments\": [{\n        \"color\": \"#2eb886\",\n        \"title\": \"CodePipeline pipeline execution *SUCCEED*\",\n        \"title_link\": \"https://github.com/yicr\",\n        \"fields\": [\n            {\n                \"title\": \"Pipeline\",\n                \"value\": \"pipeline-name\"\n            }\n        ]\n    }]\n}\n```\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "This AWS CDK Construct is designed to post messages sent from an SNS topic to a Slack Webhook via a Lambda function.",
    "version": "1.0.15",
    "project_urls": {
        "Homepage": "https://github.com/gammarers/aws-sns-slack-message-lambda-subscription.git",
        "Source": "https://github.com/gammarers/aws-sns-slack-message-lambda-subscription.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "71f952b18d93f00ff05f7b91c3ca12e2885869a211a0d053b274a5252e606bea",
                "md5": "1485bf1bc0208a915e73aaf655c14d73",
                "sha256": "449f4816d6bf37116b5f9413e1eec44dc5cad8371ebc828885db1cad87c39817"
            },
            "downloads": -1,
            "filename": "gammarers_aws_sns_slack_message_lambda_subscription-1.0.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1485bf1bc0208a915e73aaf655c14d73",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.9",
            "size": 377684,
            "upload_time": "2025-09-03T16:33:36",
            "upload_time_iso_8601": "2025-09-03T16:33:36.333368Z",
            "url": "https://files.pythonhosted.org/packages/71/f9/52b18d93f00ff05f7b91c3ca12e2885869a211a0d053b274a5252e606bea/gammarers_aws_sns_slack_message_lambda_subscription-1.0.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6fb8844cfe9873f91334c3038929bacd6264374a45595c87f66adaac576f4172",
                "md5": "3fefb815752a69737383a56aedb1e4ca",
                "sha256": "0913e05d48600b98ef5a2156a2b5dd51596afa0ecc1127ac8762473727c9e1bb"
            },
            "downloads": -1,
            "filename": "gammarers_aws_sns_slack_message_lambda_subscription-1.0.15.tar.gz",
            "has_sig": false,
            "md5_digest": "3fefb815752a69737383a56aedb1e4ca",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.9",
            "size": 378666,
            "upload_time": "2025-09-03T16:33:37",
            "upload_time_iso_8601": "2025-09-03T16:33:37.414125Z",
            "url": "https://files.pythonhosted.org/packages/6f/b8/844cfe9873f91334c3038929bacd6264374a45595c87f66adaac576f4172/gammarers_aws_sns_slack_message_lambda_subscription-1.0.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-03 16:33:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gammarers",
    "github_project": "aws-sns-slack-message-lambda-subscription",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gammarers.aws-sns-slack-message-lambda-subscription"
}
        
Elapsed time: 1.30242s