Skip to main content

How to configure CI/CD Slack notifications?

To configure CI/CD Slack notifications, you need to create a new AWS Chatbot client that connects to your Slack organization as an app. Unfortunately, notifications need to be configured using the AWS web panel.

Create a new AWS Chatbot Client

The very first thing we need to do is to create an AWS Chatbot client that is going to be connected to your Slack organisation as an app.

To create a new AWS Chatbot client, follow these steps:

  1. Open the "AWS Chatbot" service

  2. Press "Configure new client" button

    Configure new client
  3. Select "Slack"

    Select Slack
  4. Follow through the OAuth process

    Authorize Slack
  5. You should be able to see your client with a Workspace ID matching your organization.

    Configured client

Create a new channel

Next, select a channel to which the AWS Chatbot will post the messages from your CI/CD. Follow these steps:

  1. Press the "Create new channel" button

    Create new channel
  2. Fill out the fields:

  • Name – whatever value, it can be for example: {project-name}-ci

  • Channel type:

    • Public – select channel from the list

    • Private – paste the ID from the channel URL ( you can copy it from Slack)

  • Permissions – Create a new IAM role using a template

    • Channel guardrail policies – Choose AWSDenyAll.
  • SNS Topic – leave empty. It'll be created for us.

Connect the AWS Chatbot to CodePipeline

The last thing to do is to connect the created AWS Chatbot channel and our pipeline in CodePipeline.

note

You need to follow this step for every environment of your app.

  1. Fill out the name and choose a detail type
Settings
  1. Select the triggers that should lead to a notification. On the screenshot you can see the triggers that work well for us.
Triggers
  1. Choose the target type as "AWS Chatbot" and the target should be the channel you created in the previous step.
Target

That's it! You should be able to receive Slack notifications during next run of your pipeline.