Giter Club home page Giter Club logo

aws-bills-to-telegram's Introduction

aws-bills-to-telegram

Regularly sends you your current balance for your various AWS accounts to a (private) Telegram group.

Demo

Deploying via the Serverless Repo

Enter a Telegram bot token and a chat ID (group ID or your own user). Also, set IntervalHours to determine interval at which the notifications are sent.

Deploying via sceptre

If needed, you can create a virtual env with pipenv install

The build process generates boilerplate configuration with python generate-config.py.

Deploy this in all accounts in one go with:

sceptre launch -y app

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:

aws ssm put-parameter --name bot-token --type SecureString --value $YOUR_TOKEN --region us-east-1 
aws ssm put-parameter --name /bills-to-telegram/chat-id --type String --value $YOUR_CHAT_ID --region us-east-1
sceptre launch -y app

This is what will get deployed:

Images automatically generated with cfnbuddy

Adding private sceptre configuration

To generate sceptre configuration for a private environment, you can run something like: python generate-config.py production

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 .

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.