Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/parveshdhull/aws_usage
- Owner: Parveshdhull
- License: apache-2.0
- Created: 2020-11-23T22:24:09.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-03T21:34:01.000Z (almost 4 years ago)
- Last Synced: 2024-10-13T18:25:52.672Z (25 days ago)
- Topics: aws, aws-cli, slack
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
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-notifierpacman -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## Websites
https://github.com/Parveshdhull
https://twitter.com/ParveshMonu
https://youtube.com/right2trick