Table of Contents
This project is Slack App with AWS Amplify to notifications the build result from AWS Amplify Console.
You can add email notifications to notify stakeholders when a build succeeds or fails. But, cannot notify to Chat service (e.g. Slack). If you use this app, You can take notification from Amplify Console with Slack.
The amplify-slack-bot
requires the addition of the following permissions to the service role.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": [
"lambda:CreateFunctionUrlConfig",
"lambda:GetFunctionUrlConfig",
"lambda:DeleteFunctionUrlConfig",
"lambda:UpdateFunctionUrlConfig",
"sns:GetTopicAttributes",
"sns:SetTopicAttributes",
"sns:DeleteTopic",
"sns:CreateTopic",
"sns:Subscribe"
],
"Resource": [
"arn:aws:lambda:*:<accountId>:function:*",
"arn:aws:sns:*:<accountId>:*"
]
}
]
}
Since amplify-slack-bot
works as a Slack app, you must visit your apps on the Slack API website, and click Create New App.
Please follow here to set up the Slack app.
Once the Slack app is created, register the three secrets in the AWS parameter store.
- SLACK_SIGNING_SECRET
- SLACK_BOT_TOKEN
- SLACK_DEFAULT_CHANNEL
A repository has been created in your GitHub account where you forked amplify-slack-bot. Clone the repository. Pull the deployed app by running the amplify pull
command.
Set the ID of the deployed app to secretsPathAmplifyAppId
in amplify/backend/function/slackApp/parameters.json
.
{
"secretsPathAmplifyAppId": "<appId>"
}
You can get the ID of the app by executing the following command. Replace the <appId>
with its value. After rewriting the file, git commit it.
amplify env get --name dev | grep AmplifyAppId
After git push, Amplify Console will automatically start building and you will receive Amplify Console build notifications on the Slack channel you have set up.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache-2.0 License. See LICENSE
for more information.
Masahiko MURAKAMI - @fossamagna
Project Link: https://github.com/fossamagna/amplify-slack-bot