Skip to main content

AWS SNS Slack Message Lambda Subscription

GitHub npm (scoped) PyPI Nuget GitHub Workflow Status (branch) GitHub release (latest SemVer)

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

Installation

TypeScript

install by npm

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

install by yarn

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

Python

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

C# / .NET

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

https://hooks.slack.com/services/<workspace>/<channel>/<whebook>
SecretKey SecretValue
Workspace
Channel
Webhook

Code

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.
});
{
    "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.

Metadata

Release files for gammarers.aws-sns-slack-message-lambda-subscription 1.0.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gammarers.aws-sns-slack-message-lambda-subscription 1.0.22
File Size Uploaded Provenance Actions
gammarers_aws_sns_slack_message_lambda_subscription-1.0.22.tar.gz 392.5 kB Without provenance Details for gammarers_aws_sns_slack_message_lambda_subscription-1.0.22.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gammarers.aws-sns-slack-message-lambda-subscription 1.0.22
File Interpreter ABI Platform Actions
gammarers_aws_sns_slack_message_lambda_subscription-1.0.22-py3-none-any.whl Python 3 none any Details for gammarers_aws_sns_slack_message_lambda_subscription-1.0.22-py3-none-any.whl

Total release size: 784.0 kB

Release files / gammarers_aws_sns_slack_message_lambda_subscription-1.0.22.tar.gz

Download URL gammarers_aws_sns_slack_message_lambda_subscription-1.0.22.tar.gz
Size 392.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d44bc0244ee1529b0b8d90fae1391c00f9fa7b74f1634fa3bce1f35029e18ed0
BLAKE2b-256 checksum
How to use checksums
9718223285f669b640af974e5c68837cb29630161bdb962aa2e66a0f05ae1348
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.14.0

Release files / gammarers_aws_sns_slack_message_lambda_subscription-1.0.22-py3-none-any.whl

Download URL gammarers_aws_sns_slack_message_lambda_subscription-1.0.22-py3-none-any.whl
Size 391.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
964f83c56a3f71a2ce50373c6dc15ddb094daefc9e6c590d7b8c2efcc0d24c64
BLAKE2b-256 checksum
How to use checksums
8dda16ddb4ec55a232ac4b8d1a6ad9f5b582c052e75b608f50eb0edf71ff2ea7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.14.0

Security for gammarers.aws-sns-slack-message-lambda-subscription 1.0.22

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.22 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page