Configure CI/CD Slack Notifications
Unfortunately the notifications need to be configured using 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.
Open the "AWS Chatbot" service
Press "Configure new client" button
Select "Slack"
Follow through the OAuth process
You should be able to see your client with a Workspace ID matching your organisation.
Create a new channel
Next we need to select a channel to which the AWS Chatbot will post the messages from our CI/CD.
Press the "Create new channel" button
Fill out the fields:
Name – whatever value, we typically call it
{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
.
- Channel guardrail policies – Choose
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.
You need to follow this step for every environment of your app.
- Fill out the name and choose a detail type

- Select the triggers that should lead to a notification. On the screenshot you can see the triggers that work well for us.

- Choose the target type as "AWS Chatbot" and the target should be the channel you created in the previous step.

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