Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/parveshdhull/aws_usage

Python program for send alerts for data transfer usage under free tier in aws to slack and also desktop notifications
https://github.com/parveshdhull/aws_usage

aws aws-cli slack

Last synced: 10 days ago
JSON representation

Python program for send alerts for data transfer usage under free tier in aws to slack and also desktop notifications

Awesome Lists containing this project

README

        

# AWS Usage Alerts

Python program for send alerts for data transfer usage under free tier in aws to slack and also desktop notifications

## WARNING
This program uses Cost Explorer API which charges $0.01 per request

## Prerequisite:
pip install py-notifier

pacman -s aws-cli or apt-get install awscli

## Configure
* **Configure aws**
aws configure

* **Configure Slack**
You can skip this step if you only want to receive desktop notifications. Just remove last line from program. Otherwise configure your slack bot using
https://github.com/Parveshdhull/slackbot
* **Configure filter.json**
filter.json file tells program which data to reterive using API. I tried different regions and value of USAGE_TYPE variable was different for different regions. You can find value of 'DataTransfer-Out-Bytes' for your region using

``` aws ce get-dimension-values --time-period Start=2020-10-01,End=2020-10-31 --dimension USAGE_TYPE```

Some of values I found were

* APN1-DataTransfer-Out-Bytes

* APS1-DataTransfer-Out-Bytes

* USW1-DataTransfer-Out-Bytes

## Usage

aws_usage

You can put this script in your cron file and this will send you regular updates about data usage. Just be careful you don't run often otherwise you will get huge bill because you are paying $0.01 per request

## YouTube Tutorial
https://www.youtube.com/watch?v=kRx-AYH9UeI

## Liked my work?
Buy Me A Coffee

## Websites
https://github.com/Parveshdhull

https://twitter.com/ParveshMonu

https://youtube.com/right2trick