Socket
Socket
Sign inDemoInstall

@aws-cdk/aws-chatbot

Package Overview
Dependencies
31
Maintainers
4
Versions
206
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aws-cdk/aws-chatbot

The CDK Construct Library for AWS::Chatbot


Version published
Weekly downloads
2.4K
increased by2.04%
Maintainers
4
Created
Weekly downloads
 

Readme

Source

AWS::Chatbot Construct Library


End-of-Support

AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2.

For more information on how to migrate, see the Migrating to AWS CDK v2 guide.


AWS Chatbot is an AWS service that enables DevOps and software development teams to use Slack chat rooms to monitor and respond to operational events in their AWS Cloud. AWS Chatbot processes AWS service notifications from Amazon Simple Notification Service (Amazon SNS), and forwards them to Slack chat rooms so teams can analyze and act on them immediately, regardless of location.

This module is part of the AWS Cloud Development Kit project.

import * as chatbot from '@aws-cdk/aws-chatbot';
import * as sns from '@aws-cdk/aws-sns';
import * as iam from '@aws-cdk/aws-iam';

const slackChannel = new chatbot.SlackChannelConfiguration(this, 'MySlackChannel', {
  slackChannelConfigurationName: 'YOUR_CHANNEL_NAME',
  slackWorkspaceId: 'YOUR_SLACK_WORKSPACE_ID',
  slackChannelId: 'YOUR_SLACK_CHANNEL_ID',
});

slackChannel.addToRolePolicy(new iam.PolicyStatement({
  effect: iam.Effect.ALLOW,
  actions: [
    's3:GetObject',
  ],
  resources: ['arn:aws:s3:::abc/xyz/123.txt'],
}));

slackChannel.addNotificationTopic(new sns.Topic(this, 'MyTopic'));

Log Group

Slack channel configuration automatically create a log group with the name /aws/chatbot/<configuration-name> in us-east-1 upon first execution with log data set to never expire.

The logRetention property can be used to set a different expiration period. A log group will be created if not already exists. If the log group already exists, it's expiration will be configured to the value specified in this construct (never expire, by default).

By default, CDK uses the AWS SDK retry options when interacting with the log group. The logRetentionRetryOptions property allows you to customize the maximum number of retries and base backoff duration.

Note that, if logRetention is set, a CloudFormation custom resource is added to the stack that pre-creates the log group as part of the stack deployment, if it already doesn't exist, and sets the correct log retention period (never expire, by default).

Keywords

FAQs

Last updated on 19 Jun 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc