https://github.com/fossamagna/amplify-slack-bot
Slack App to notification build result from AWS Amplify Console π
https://github.com/fossamagna/amplify-slack-bot
amplify amplify-console slack
Last synced: 10 months ago
JSON representation
Slack App to notification build result from AWS Amplify Console π
- Host: GitHub
- URL: https://github.com/fossamagna/amplify-slack-bot
- Owner: fossamagna
- Created: 2022-12-16T06:06:50.000Z (about 3 years ago)
- Default Branch: dev
- Last Pushed: 2023-12-15T05:45:18.000Z (about 2 years ago)
- Last Synced: 2025-01-04T14:52:50.999Z (about 1 year ago)
- Topics: amplify, amplify-console, slack
- Language: JavaScript
- Homepage:
- Size: 21.5 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# amplify-slack-bot
Table of Contents
## About The Project
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.
## Getting Started
### Click `DEPLOY TO AMPLIFY CONSOLE` button
[](https://console.aws.amazon.com/amplify/home#/deploy?repo=https://github.com/fossamagna/amplify-slack-bot)
### service role
The `amplify-slack-bot` requires the addition of the following permissions to the service role.
```json
{
"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:*::function:*",
"arn:aws:sns:*::*"
]
}
]
}
```
### Create new Slack app
Since `amplify-slack-bot` works as a Slack app, you must visit [your apps](https://api.slack.com/apps) on the Slack API website, and click Create New App.
Please follow [here](https://github.com/fossamagna/amplify-category-console-notification/blob/main/packages/amplify-slack-app/docs/SETUP.md) to set up the Slack app.
### Register Secret Parameters
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.

### Edit `amplify/backend/function/slackApp/parameters.json`
Set the ID of the deployed app to `secretsPathAmplifyAppId` in `amplify/backend/function/slackApp/parameters.json`.
```json
{
"secretsPathAmplifyAppId": ""
}
```
You can get the ID of the app by executing the following command. Replace the `` 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.
## Roadmap
See the [open issues](https://github.com/fossamagna/amplify-slack-bot/issues) for a list of proposed features (and known issues).
## Contributing
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**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License
Distributed under the Apache-2.0 License. See `LICENSE` for more information.
## Contact
Masahiko MURAKAMI - [@fossamagna](https://twitter.com/fossamagna)
Project Link: [https://github.com/fossamagna/amplify-slack-bot](https://github.com/fossamagna/amplify-slack-bot)
## Related article and project
- [Deploy to Amplify ConsoleγγΏγ³γ試γγ¦γΏγ (Japanese)](https://fossamagna.github.io/deploy-to-amplify-console/)
- [amplify-category-console-notification](https://github.com/fossamagna/amplify-category-console-notification)