You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pattern demonstrates how you can setup a fully serverless setup to integrate your SNS topic with Slack/Teams channel. This provisions AWS resources for you and you just need to integrate your Slack/Teams webhooks to get it running.
4
+
5
+
[Learn more about this pattern at Serverless Land Patterns](https://serverlessland.com/repos/sns-slack-teams-integration-cdk-python)
Important: this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the [AWS Pricing page](https://aws.amazon.com/pricing/) for details. You are responsible for any AWS costs incurred. No warranty is implied in this example.
10
+
11
+
## Requirements
12
+
13
+
*[Create an AWS account](https://portal.aws.amazon.com/gp/aws/developer/registration/index.html) if you do not already have one and log in. The IAM user that you use must have sufficient permissions to make necessary AWS service calls and manage AWS resources.
14
+
*[AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured
cd serverless-patterns/sns-slack-teams-integration-cdk-python
27
+
```
28
+
3. To manually create a virtualenv on MacOS and Linux:
29
+
```bash
30
+
python3 -m venv .venv
31
+
```
32
+
4. After the init process completes and the virtualenv is created, you can use the following
33
+
step to activate your virtualenv.
34
+
```bash
35
+
source .venv/bin/activate
36
+
```
37
+
5. If you are a Windows platform, you would activate the virtualenv like this:
38
+
```bash
39
+
.venv\Scripts\activate.bat
40
+
```
41
+
6. Once the virtualenv is activated, you can install the required dependencies.
42
+
```bash
43
+
pip install -r requirements.txt
44
+
```
45
+
7. To deploy the application:
46
+
```bash
47
+
cdk deploy
48
+
```
49
+
50
+
## How it works
51
+
52
+
This template will create an SNS topic which you can use to publish notifications to your Slack/Teams channel, and a Lambda functionwhich will process the SNS message and pass it to the Slack/Teams webhook. You can customise the code to apply additional formatting as per your usecase.
"title": "Amazon SNS integration with Slack/Teams channels",
3
+
"description": "This sample project demonstrates the publishing of messages from an SNS topic to an AWS Lambda function, which in turn triggers notifications to a Slack/Teams channel.",
4
+
"language": "Python",
5
+
"level": "200",
6
+
"framework": "CDK",
7
+
"introBox": {
8
+
"headline": "How it works",
9
+
"text": [
10
+
"This sample pattern demonstrates how to use AWS SNS and Lambda function to deliver notifications to your slack or teams channels.",
11
+
"This pattern uses AWS CDK to setup the AWS serverless services and provides you with a setup ready to be integrated with your Slack/Teams channel",
12
+
"This pattern deploys one SNS topic and one Lambda function"
0 commit comments