https://github.com/jeshan/cfn-failures-to-telegram
Send cloudformation failure events to Telegram
https://github.com/jeshan/cfn-failures-to-telegram
cloudformation sceptre telegram telegram-bot
Last synced: 12 months ago
JSON representation
Send cloudformation failure events to Telegram
- Host: GitHub
- URL: https://github.com/jeshan/cfn-failures-to-telegram
- Owner: jeshan
- License: bsd-2-clause
- Created: 2019-04-20T21:14:46.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-29T18:46:21.000Z (almost 6 years ago)
- Last Synced: 2025-07-01T19:08:41.190Z (12 months ago)
- Topics: cloudformation, sceptre, telegram, telegram-bot
- Language: Python
- Homepage:
- Size: 1.23 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cfn-failures-to-telegram
Instantly notifies you of cloudformation failures (i.e create failed, rollbacks, etc) in a Telegram group. (prereq: deploy [this template first](https://github.com/jeshan/cfn-stack-notifications) to ensure your stacks are sending their events to SNS)

If needed, you can create a virtual env with `pipenv install`
This includes a deployment pipeline on AWS. Or deploy the pipeline manually with this button:
You will need a telegram bot token and a telegram group (chat) id. Define them in us-east-1 as follows:
```bash
aws ssm put-parameter --name bot-token --type SecureString --value $YOUR_TOKEN --region us-east-1
aws ssm put-parameter --name /cfn-failures-to-telegram/chat-id --type String --value $YOUR_CHAT_ID --region us-east-1
sceptre launch -y app
```
## Infrastructure
This is what will get deployed:



*Images automatically generated with [cfnbuddy](https://www.cfnbuddy.com)*
# Adding private sceptre configuration
The build process also generates boilerplate configuration with `python generate-config.py`.
You have the ability to provide sceptre with the necessary configuration and credentials that you will want to keep private.
Read the buildspec for this, in particular:
`aws s3 sync s3://${PRIVATE_BUCKET}/github.com/$REPO/master .`
To generate sceptre configuration for a private environment, you can run something like:
`python generate-config.py production`
You can place your private sceptre configuration at that location in a private bucket and they will be pulled on build.
There's a script available to send these files to S3: Edit your private bucket in `upload-private-config.sh` and run it.
You need to create the role so that your deployment pipeline has permissions to deploy. run `python put-target-deployment-roles.py`
Add the target account number in `config/app/${ENV}/config.yaml`.
Then, run the pipeline. That's all what's needed for sceptre to work.